mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 04:23:01 +00:00
implement play next and add to Queue
This commit is contained in:
@@ -197,5 +197,17 @@ export default defineStore("Queue", {
|
||||
|
||||
this.setNewQueue(tracks);
|
||||
},
|
||||
addTrackToQueue(track: Track) {
|
||||
this.tracks.push(track);
|
||||
addQToLocalStorage(this.from, this.tracks);
|
||||
},
|
||||
playTrackNext(track: Track) {
|
||||
const current = this.tracks.findIndex(
|
||||
(t: Track) => t.trackid === this.current.trackid
|
||||
);
|
||||
|
||||
this.tracks.splice(current + 1, 0, track);
|
||||
addQToLocalStorage(this.from, this.tracks);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user