possible fix for soundcloud
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Fri, 29 Mar 2024 10:20:44 +0000 (11:20 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Fri, 29 Mar 2024 10:20:44 +0000 (11:20 +0100)
music_assistant/server/providers/soundcloud/__init__.py

index f1f8292af1d460a8e9a599ff8199bacd31f6bbe5..f3dd1e062da91ba5ffcb10437aac2d969e5a5e16 100644 (file)
@@ -322,14 +322,16 @@ class SoundcloudMusicProvider(MusicProvider):
         self, streamdetails: StreamDetails, seek_position: int = 0
     ) -> AsyncGenerator[bytes, None]:
         """Return the audio stream for the provider item."""
-        resolved_url, _, is_hls = await resolve_radio_stream(self.mass, streamdetails.data)
+        _, _, is_hls = await resolve_radio_stream(self.mass, streamdetails.data)
         if is_hls:
             # some soundcloud streams are HLS, prefer the radio streamer
-            async for chunk in get_hls_stream(self.mass, resolved_url, streamdetails):
+            async for chunk in get_hls_stream(self.mass, streamdetails.data, streamdetails):
                 yield chunk
             return
         # regular stream from http
-        async for chunk in get_http_stream(self.mass, resolved_url, streamdetails, seek_position):
+        async for chunk in get_http_stream(
+            self.mass, streamdetails.data, streamdetails, seek_position
+        ):
             yield chunk
 
     async def _parse_artist(self, artist_obj: dict) -> Artist: