diff options
| author | Rithwik Rayani <[email protected]> | 2022-03-30 04:08:24 +0530 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-03-29 17:38:24 -0500 |
| commit | bd749d95a95fa9667ffb7bbf905b5b07a529c7da (patch) | |
| tree | 91c1c616b237084a06a76fff80f1938a2d6870fd /src/services | |
| parent | ce017090e1c2db0a214e959e437d29fd8069fd05 (diff) | |
| download | muse-bd749d95a95fa9667ffb7bbf905b5b07a529c7da.tar.xz muse-bd749d95a95fa9667ffb7bbf905b5b07a529c7da.zip | |
/move command now shows the track that was moved and its position (#610)
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/player.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/services/player.ts b/src/services/player.ts index bb8180d..abcc8ca 100644 --- a/src/services/player.ts +++ b/src/services/player.ts @@ -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 { |
