From 4be65a911b6024dc924d1e7d016cab8c42179f71 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 25 Aug 2008 20:53:16 -0700 Subject: playlist: fix "currentsong" after song deletion When deleting previous songs, we forgot to update the playlist.queue value, causing syncPlaylistWithQueue to trigger a false sync and screw with the playlist.current pointer; causing the currentsong command to return an incorrect song. Thanks to unK to reporting this bug! --- src/playlist.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/playlist.c b/src/playlist.c index 1c743edc0..4b1042409 100644 --- a/src/playlist.c +++ b/src/playlist.c @@ -824,6 +824,8 @@ int deleteFromPlaylist(int fd, int song) stop_current = 1; if (playlist.current > songOrder) { + if (playlist.current == prev_queued) + playlist.queued = playlist.current - 1; playlist.current--; } else if (playlist.current >= playlist.length) { incrPlaylistCurrent(); -- cgit v1.2.3