From: Marcel van der Veldt Date: Fri, 29 Mar 2024 10:20:44 +0000 (+0100) Subject: possible fix for soundcloud X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=6d78c3c04bde0dcda1d4b9d9bdadba38b9070f1a;p=music-assistant-server.git possible fix for soundcloud --- diff --git a/music_assistant/server/providers/soundcloud/__init__.py b/music_assistant/server/providers/soundcloud/__init__.py index f1f8292a..f3dd1e06 100644 --- a/music_assistant/server/providers/soundcloud/__init__.py +++ b/music_assistant/server/providers/soundcloud/__init__.py @@ -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: