fix playback of pls radio streams in tunein
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 2 Apr 2023 16:06:54 +0000 (18:06 +0200)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 2 Apr 2023 16:06:54 +0000 (18:06 +0200)
music_assistant/server/providers/tunein/__init__.py

index 6a7f182a37c470aedff5e18164251946345e9d0f..d17dfbf02d168d86ab7d932e986ddf2ab58ea09f 100644 (file)
@@ -202,7 +202,7 @@ class TuneInProvider(MusicProvider):
             # check if the radio stream is not a playlist
             url = stream["url"]
             direct = None
-            if url.endswith("m3u8") or url.endswith("m3u") or url.endswith("pls"):  # noqa: SIM102
+            if stream.get("playlist_type"):  # noqa: SIM102
                 if playlist := await fetch_playlist(self.mass, url):
                     if len(playlist) > 1 or ".m3u" in playlist[0] or ".pls" in playlist[0]:
                         # this is most likely an mpeg-dash stream, let ffmpeg handle that