Update player_queue.py
authormarcelveldt <marcelvanderveldt@MacBook-Silvia.local>
Thu, 17 Oct 2019 16:02:27 +0000 (18:02 +0200)
committermarcelveldt <marcelvanderveldt@MacBook-Silvia.local>
Thu, 17 Oct 2019 16:02:27 +0000 (18:02 +0200)
typo

music_assistant/models/player_queue.py

index 2a8ca98b265fd9be0262d32193a3974c1a6766fd..be2df942ff41d5639e91346695c71aa3aba02fae 100755 (executable)
@@ -247,10 +247,10 @@ class PlayerQueue():
 
     async def update(self):
         ''' update queue details, called when player updates '''
+        cur_index = self._cur_index
         # determine queue index and cur_time for queue stream
         if self.use_queue_stream and self._player.state == PlayerState.Playing:
             # player is playing a constant stream of the queue so we need to do this the hard way
-            cur_index = self._cur_index
             cur_time_queue = self._player._cur_time
             total_time = 0
             track_time = 0