diff --git a/src/preload/cider-preload.js b/src/preload/cider-preload.js
index dea3f90c..bf6f2924 100644
--- a/src/preload/cider-preload.js
+++ b/src/preload/cider-preload.js
@@ -23,7 +23,7 @@ const MusicKitInterop = {
/** wsapi */
MusicKit.getInstance().addEventListener(MusicKit.Events.nowPlayingItemDidChange, async () => {
- await MusicKitInterop.modifyNamesOnLocale();
+ // await MusicKitInterop.modifyNamesOnLocale();
if (MusicKitInterop.filterTrack(MusicKitInterop.getAttributes(), false, true) || !app.cfg.lastfm.filterLoop) {
global.ipcRenderer.send('nowPlayingItemDidChange', MusicKitInterop.getAttributes());
}
diff --git a/src/renderer/index.js b/src/renderer/index.js
index 2e0da967..4169deb2 100644
--- a/src/renderer/index.js
+++ b/src/renderer/index.js
@@ -2804,17 +2804,17 @@ const app = new Vue({
})
})
} 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 {
- app.mk.play()
- }
- })
+ app.mk.queue.splice(0, app.mk.queue._itemIDs.length)
+ if (app.mk.shuffleMode == 1) {
+ shuffleArray(query)
+ }
+ app.mk.queue.append(query)
+ if (childIndex != -1) {
+ app.mk.changeToMediaAtIndex(childIndex)
+ } else {
+ app.mk.play()
+ }
+
}
})
} else if (parent.startsWith('listitem-hr')) {
@@ -2859,20 +2859,30 @@ const app = new Vue({
itemsToPlay[item.kind].push(item.id)
})
// loop through itemsToPlay
+ app.mk.queue.splice(0, app.mk.queue._itemIDs.length)
let ind = 0;
for (let kind in itemsToPlay) {
let ids = itemsToPlay[kind]
- app.mk.clearQueue().then(function () {
- if (ids.length > 0) {
- app.mk.playLater({ [kind + "s"]: itemsToPlay[kind] }).then(function() {
+ if (ids.length > 0) {
+ if (app.mk.queue._itemIDs.length > 0) {
+ app.mk.playLater({ [kind + "s"]: itemsToPlay[kind] }).then(function () {
+ ind += 1;
+ console.log(ind, Object.keys(itemsToPlay).length)
+ if (ind >= Object.keys(itemsToPlay).length) {
+ app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.attributes.playParams.id ?? item.id))
+ }
+ }
+ )} else {
+ app.mk.setQueue({ [kind + "s"]: itemsToPlay[kind] }).then(function () {
ind += 1;
- console.log(ind , Object.keys(itemsToPlay).length)
- if(ind >= Object.keys(itemsToPlay).length) {
+ console.log(ind, Object.keys(itemsToPlay).length)
+ if (ind >= Object.keys(itemsToPlay).length) {
app.mk.changeToMediaAtIndex(app.mk.queue._itemIDs.indexOf(item.attributes.playParams.id ?? item.id))
}
- }
- )}
- })
+ }
+ )}
+ }
+
}
}
})
diff --git a/src/renderer/views/pages/remote-pair.ejs b/src/renderer/views/pages/remote-pair.ejs
index ccd08ead..f4fe510b 100644
--- a/src/renderer/views/pages/remote-pair.ejs
+++ b/src/renderer/views/pages/remote-pair.ejs
@@ -1,6 +1,6 @@