fix for bug #1447
git-svn-id: https://svn.musicpd.org/mpd/trunk@5369 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
81fd135651
commit
d7e8507eaf
@ -1194,12 +1194,26 @@ int moveSongInPlaylist(int fd, int from, int to)
|
|||||||
playlist.order[i] = to;
|
playlist.order[i] = to;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (playlist.current == from)
|
}
|
||||||
playlist.current = to;
|
else
|
||||||
else if (playlist.current > from && playlist.current <= to) {
|
{
|
||||||
playlist.current--;
|
if (playlist.current == from)
|
||||||
} else if (playlist.current >= to && playlist.current < from) {
|
playlist.current = to;
|
||||||
playlist.current++;
|
else if (playlist.current > from && playlist.current <= to) {
|
||||||
|
playlist.current--;
|
||||||
|
} else if (playlist.current >= to && playlist.current < from) {
|
||||||
|
playlist.current++;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* this first if statement isn't necessary since the queue
|
||||||
|
* would have been cleared out if queued == from */
|
||||||
|
if (playlist.queued == from)
|
||||||
|
playlist.queued = to;
|
||||||
|
else if (playlist.queued > from && playlist.queued <= to) {
|
||||||
|
playlist.queued--;
|
||||||
|
} else if (playlist.queued>= to && playlist.queued < from) {
|
||||||
|
playlist.queued++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
incrPlaylistVersion();
|
incrPlaylistVersion();
|
||||||
|
Loading…
Reference in New Issue
Block a user