Update index.js
This commit is contained in:
parent
a1e7edccdd
commit
7fdcaf9228
1 changed files with 9 additions and 2 deletions
|
@ -2458,8 +2458,15 @@ const app = new Vue({
|
||||||
app.mk.setQueue({[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id}).then(function () {
|
app.mk.setQueue({[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id}).then(function () {
|
||||||
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1).then(function () {
|
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.id) ?? 1).then(function () {
|
||||||
if ((app.showingPlaylist && app.showingPlaylist.id == id)) {
|
if ((app.showingPlaylist && app.showingPlaylist.id == id)) {
|
||||||
let query = app.showingPlaylist.relationships.tracks.data.map(item => new MusicKit.MediaItem(item));
|
let query = app.showingPlaylist.relationships.tracks.data.map(item => new MusicKit.MediaItem(item)),
|
||||||
let u = query;
|
u;
|
||||||
|
|
||||||
|
u = query;
|
||||||
|
|
||||||
|
for (let i = 0; i < app.showingPlaylist.relationships.tracks.data.length; i++) {
|
||||||
|
if (app.showingPlaylist.relationships.tracks.data[i].id == item.id) u.splice(0, i);
|
||||||
|
}
|
||||||
|
|
||||||
if (app.mk.shuffleMode == 1) {
|
if (app.mk.shuffleMode == 1) {
|
||||||
shuffleArray(u)
|
shuffleArray(u)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue