Fix: Disable shuffle for radio mode (#1673)
authorMarvin Schenkel <marvinschenkel@gmail.com>
Wed, 18 Sep 2024 21:34:12 +0000 (23:34 +0200)
committerGitHub <noreply@github.com>
Wed, 18 Sep 2024 21:34:12 +0000 (23:34 +0200)
Disable shuffle for radio mode

music_assistant/server/controllers/player_queues.py

index 962cdc6a3729257394be7a4a0fc95b55b70449a7..de35d390c403de52a1231183102c77c3fb3b46c7 100644 (file)
@@ -447,7 +447,8 @@ class PlayerQueuesController(CoreController):
         else:
             cur_index = queue.current_index or 0
         insert_at_index = cur_index + 1 if self._queue_items.get(queue_id) else 0
-        shuffle = queue.shuffle_enabled and len(queue_items) > 1
+        # Radio modes are already shuffled in a pattern we would like to keep.
+        shuffle = queue.shuffle_enabled and len(queue_items) > 1 and not radio_mode
 
         # handle replace: clear all items and replace with the new items
         if option == QueueOption.REPLACE: