mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-05-11 20:31:35 +02:00
/move command now shows the track that was moved and its position (#610)
This commit is contained in:
parent
ce017090e1
commit
bd749d95a9
3 changed files with 7 additions and 3 deletions
|
@ -379,12 +379,14 @@ export default class {
|
|||
this.queue = [];
|
||||
}
|
||||
|
||||
move(from: number, to: number): void {
|
||||
move(from: number, to: number): QueuedSong {
|
||||
if (from > this.queueSize() || to > this.queueSize()) {
|
||||
throw new Error('Move index is outside the range of the queue.');
|
||||
}
|
||||
|
||||
this.queue.splice(this.queuePosition + to, 0, this.queue.splice(this.queuePosition + from, 1)[0]);
|
||||
|
||||
return this.queue[this.queuePosition + to];
|
||||
}
|
||||
|
||||
private getHashForCache(url: string): string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue