From 16ce12ad675ba42f881c0f10bbc2dd8c3a0665f7 Mon Sep 17 00:00:00 2001 From: Christian Hoffmann Date: Sat, 30 Mar 2024 20:30:33 +0100 Subject: [PATCH] Fix PlayerMPD.rewind to start with the first song 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" --- src/jukebox/components/playermpd/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jukebox/components/playermpd/__init__.py b/src/jukebox/components/playermpd/__init__.py index 05dff82b8..0545f99b1 100644 --- a/src/jukebox/components/playermpd/__init__.py +++ b/src/jukebox/components/playermpd/__init__.py @@ -361,7 +361,7 @@ def rewind(self): Note: Will not re-read folder config, but leave settings untouched""" logger.debug("Rewind") with self.mpd_lock: - self.mpd_client.play(1) + self.mpd_client.play(0) self.play_position_tracker.flush() @plugs.tag