From: marcelveldt Date: Sun, 10 Nov 2019 23:15:47 +0000 (+0100) Subject: Update player_queue.py X-Git-Url: https://git.kitaultman.com/?a=commitdiff_plain;h=115c40e1b47033de9de7401291fbdbcc91d203cd;p=music-assistant-server.git Update player_queue.py --- diff --git a/music_assistant/models/player_queue.py b/music_assistant/models/player_queue.py index 8bb1f2d7..9c00b404 100755 --- a/music_assistant/models/player_queue.py +++ b/music_assistant/models/player_queue.py @@ -236,7 +236,7 @@ class PlayerQueue(): if not len(self.items) > index: return if self.use_queue_stream: - self._last_queue_startindex = index + self._next_queue_startindex = index queue_stream_uri = 'http://%s:%s/stream/%s'% ( self.mass.web.local_ip, self.mass.web.http_port, self._player.player_id) return await self._player.cmd_play_uri(queue_stream_uri) @@ -388,6 +388,7 @@ class PlayerQueue(): async def start_queue_stream(self): ''' called by the queue streamer when it starts playing the queue stream ''' + self._last_queue_startindex = self._next_queue_startindex return await self.get_item(self._next_queue_startindex) def to_dict(self): @@ -446,7 +447,7 @@ class PlayerQueue(): if (self._player.cur_time == 0 and self._player.state in [PlayerState.Stopped, PlayerState.Off]): # player stopped playing - self._last_queue_startindex = self.cur_index + self._next_queue_startindex = self.cur_index # update vars if track_time > 2: # account for track changing state so keep this a few seconds behind