Apple Music: Fix condition for hls substream optimization. (#1574)
authorMarvin Schenkel <marvinschenkel@gmail.com>
Sun, 18 Aug 2024 12:41:53 +0000 (14:41 +0200)
committerGitHub <noreply@github.com>
Sun, 18 Aug 2024 12:41:53 +0000 (14:41 +0200)
Fix condition for hls substream optimization.

music_assistant/server/helpers/audio.py

index 5c47b7c68b958996eab70badc823e8489da4b8a9..54b552489cf1d27a057d0308dba6f6d15a47b89e 100644 (file)
@@ -565,7 +565,7 @@ async def get_hls_substream(
         charset = resp.charset or "utf-8"
         master_m3u_data = await resp.text(charset)
     substreams = parse_m3u(master_m3u_data)
-    if any(x for x in substreams if x.length):
+    if any(x for x in substreams if x.length and not x.key):
         # this is already a substream!
         return PlaylistItem(
             path=url,