Fix seeking on non track items
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 5 Jan 2025 22:37:53 +0000 (23:37 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Sun, 5 Jan 2025 22:37:53 +0000 (23:37 +0100)
music_assistant/controllers/player_queues.py

index 328446adf845431ee6b582d277927fa46ec93588..f5148cdd21ef7ddbbc8dc6ba3946eb4b3c698504 100644 (file)
@@ -713,11 +713,8 @@ class PlayerQueuesController(CoreController):
         queue_player: Player = self.mass.players.get(queue_id, True)
         if not queue.current_item:
             raise InvalidCommand(f"Queue {queue_player.display_name} has no item(s) loaded.")
-        if (
-            queue.current_item.media_item.media_type != MediaType.TRACK
-            or not queue.current_item.duration
-        ):
-            raise InvalidCommand("Can not seek on non track items.")
+        if not queue.current_item.duration:
+            raise InvalidCommand("Can not seek items without duration.")
         position = max(0, int(position))
         if position > queue.current_item.duration:
             raise InvalidCommand("Can not seek outside of duration range.")