command/QueueCommands: reimplement relative "move"/"moveid" offsets

The existing implementation has been utterly broken forever; I cannot
explain what it actually does, but it doesn't do what the
documentation says.
This commit is contained in:
Max Kellermann
2021-10-07 22:04:12 +02:00
parent e63ecd81ec
commit c0bcfe244c
6 changed files with 86 additions and 55 deletions

View File

@@ -147,14 +147,10 @@ struct Partition final : QueueListener, PlayerListener, MixerListener {
playlist.Shuffle(pc, range);
}
void MoveRange(RangeArg range, int to) {
void MoveRange(RangeArg range, unsigned to) {
playlist.MoveRange(pc, range, to);
}
void MoveId(unsigned id, int to) {
playlist.MoveId(pc, id, to);
}
void SwapPositions(unsigned song1, unsigned song2) {
playlist.SwapPositions(pc, song1, song2);
}