bug fix for deleting a song when the last song or next to last song is playing and causing playlist.current to be set to -1
git-svn-id: https://svn.musicpd.org/mpd/trunk@1479 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
77f824ce20
commit
17c13ea0e8
@ -767,12 +767,12 @@ int deleteFromPlaylist(FILE * fp, int song) {
|
||||
playlist_noGoToNext = 1;
|
||||
}
|
||||
|
||||
if(playlist.current>=playlist.length) {
|
||||
incrPlaylistCurrent();
|
||||
}
|
||||
else if(playlist.current>songOrder) {
|
||||
if(playlist.current>songOrder) {
|
||||
playlist.current--;
|
||||
}
|
||||
else if(playlist.current>=playlist.length) {
|
||||
incrPlaylistCurrent();
|
||||
}
|
||||
|
||||
if(playlist.queued>songOrder) {
|
||||
playlist.queued--;
|
||||
|
Loading…
Reference in New Issue
Block a user