fix play next

This commit is contained in:
vapormusic 2021-12-16 11:59:35 +07:00
parent e78171b5a0
commit fe970f6e4b

View file

@ -87,7 +87,10 @@
{
"name": "Play Next",
"action": function() {
app.mk.queue.splice(0,0,[new MusicKit.MediaItem(self.item)])
const {_mediaItemPlayback: e} = app.mk
, {position: s} = app.mk.queue;
prependIndex = void 0 === e.nowPlayingItem && 0 === s || s < 0 ? 0 : s + 1
app.mk.queue.splice(prependIndex,0,[new MusicKit.MediaItem(self.item)])
}
},
{