From 8dfec5ff49b7da4a927ad86950d5ce00c2b9203b Mon Sep 17 00:00:00 2001 From: vapormusic Date: Wed, 26 Jan 2022 22:22:10 +0700 Subject: [PATCH] fix this looped thing --- src/main/plugins/lastfm.ts | 1 + src/preload/cider-preload.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/plugins/lastfm.ts b/src/main/plugins/lastfm.ts index 006256db..51ddcc34 100644 --- a/src/main/plugins/lastfm.ts +++ b/src/main/plugins/lastfm.ts @@ -244,6 +244,7 @@ export default class LastFMPlugin { */ onNowPlayingItemDidChange(attributes: object): void { if (!this._store.lastfm.filterLoop){ + this._lastfm.cachedNowPlayingAttributes = false; this._lastfm.cachedAttributes = false} this.scrobbleSong(attributes) this.updateNowPlayingSong(attributes) diff --git a/src/preload/cider-preload.js b/src/preload/cider-preload.js index c1eb6046..7d921eeb 100644 --- a/src/preload/cider-preload.js +++ b/src/preload/cider-preload.js @@ -24,7 +24,7 @@ const MusicKitInterop = { /** wsapi */ MusicKit.getInstance().addEventListener(MusicKit.Events.nowPlayingItemDidChange, () => { - if (MusicKitInterop.filterTrack(MusicKitInterop.getAttributes(), false, true)) { + if (MusicKitInterop.filterTrack(MusicKitInterop.getAttributes(), false, true) || !app.cfg.lastfm.filterLoop) { global.ipcRenderer.send('nowPlayingItemDidChange', MusicKitInterop.getAttributes()); } });