fix keyerror
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Fri, 8 Jul 2022 00:07:59 +0000 (02:07 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Fri, 8 Jul 2022 00:07:59 +0000 (02:07 +0200)
music_assistant/helpers/tags.py

index d16572bc1fbe6424e46b462733785add9cd9e3d4..cb6230b214eada31578cc12b4b91c02ef369d35f 100644 (file)
@@ -162,7 +162,7 @@ class AudioTags:
             )
             or 16,
             format=raw["format"]["format_name"],
-            bit_rate=int(raw["format"]["bit_rate"]),
+            bit_rate=int(raw["format"].get("bit_rate", 320)),
             duration=float(raw["format"]["duration"]),
             tags=tags,
             has_cover_image=has_cover_image,