fix playback of library songs on shuffle
This commit is contained in:
parent
25f53f9b72
commit
0bbf4ee4b3
1 changed files with 23 additions and 17 deletions
|
@ -2514,24 +2514,30 @@ const app = new Vue({
|
|||
|
||||
|
||||
app.mk.stop().then(() => {
|
||||
this.mk.clearQueue().then(function(_) {
|
||||
if (item) {
|
||||
app.mk.setQueue({
|
||||
[item.attributes.playParams.kind ?? item.type]: item.attributes.playParams.id ?? item.id
|
||||
}).then(function () {
|
||||
app.mk.play().then(() => {
|
||||
if (app.mk.shuffleMode == 1) {
|
||||
shuffleArray(query)
|
||||
}
|
||||
app.mk.queue.append(query)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.mk.clearQueue().then(function (_) {
|
||||
if (app.mk.shuffleMode == 1) {
|
||||
shuffleArray(query)
|
||||
}
|
||||
app.mk.queue.append(query)
|
||||
if (childIndex != -1) {
|
||||
app.mk.changeToMediaAtIndex(childIndex)
|
||||
} else if (item) {
|
||||
app.mk.playNext({
|
||||
[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)
|
||||
app.mk.play()
|
||||
})
|
||||
} else {
|
||||
app.mk.play()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
app.mk.stop().then(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue