Fix radio (#722)
authorMarvin Schenkel <marvinschenkel@gmail.com>
Sat, 17 Jun 2023 17:38:29 +0000 (19:38 +0200)
committerGitHub <noreply@github.com>
Sat, 17 Jun 2023 17:38:29 +0000 (19:38 +0200)
We do need a list

music_assistant/server/controllers/media/playlists.py

index 165dee6b9fe510c6724e9981c5182d23bd999a4a..376f3d3d6f03d8d2ba4ec669f93b76afb3745ba7 100644 (file)
@@ -338,7 +338,7 @@ class PlaylistController(MediaControllerBase[Playlist]):
         radio_items = {track.sort_name: track for track in final_items}.values()
         # NOTE: In theory we can return a few more items than limit here
         # Shuffle the final items list
-        return random.sample(radio_items, len(radio_items))
+        return random.sample(list(radio_items), len(radio_items))
 
     async def _get_dynamic_tracks(
         self, media_item: Playlist, limit: int = 25  # noqa: ARG002