Skip to content

Commit aadff23

Browse files
authored
Fix PlayerMPD.rewind to start with the first song (MiczFlor#2323)
rewind() is documented to jump to the first song of the playlist. Instead, it jumped to the second song as SONGPOS in MPDClient.play(SONGPOS) is zero-indexed [1], so mpd.play(1) started the second song. [1] https://mpd.readthedocs.io/en/latest/protocol.html#the-queue "The position is a 0-based index" Related: MiczFlor#2294
1 parent 27b23cb commit aadff23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jukebox/components/playermpd/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def rewind(self):
350350
Note: Will not re-read folder config, but leave settings untouched"""
351351
logger.debug("Rewind")
352352
with self.mpd_lock:
353-
self.mpd_client.play(1)
353+
self.mpd_client.play(0)
354354

355355
@plugs.tag
356356
def replay(self):

0 commit comments

Comments
 (0)