fix this looped thing

This commit is contained in:
vapormusic 2022-01-26 22:22:10 +07:00
parent 5e87c858ba
commit 8dfec5ff49
2 changed files with 2 additions and 1 deletions

View file

@ -244,6 +244,7 @@ export default class LastFMPlugin {
*/ */
onNowPlayingItemDidChange(attributes: object): void { onNowPlayingItemDidChange(attributes: object): void {
if (!this._store.lastfm.filterLoop){ if (!this._store.lastfm.filterLoop){
this._lastfm.cachedNowPlayingAttributes = false;
this._lastfm.cachedAttributes = false} this._lastfm.cachedAttributes = false}
this.scrobbleSong(attributes) this.scrobbleSong(attributes)
this.updateNowPlayingSong(attributes) this.updateNowPlayingSong(attributes)

View file

@ -24,7 +24,7 @@ const MusicKitInterop = {
/** wsapi */ /** wsapi */
MusicKit.getInstance().addEventListener(MusicKit.Events.nowPlayingItemDidChange, () => { 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()); global.ipcRenderer.send('nowPlayingItemDidChange', MusicKitInterop.getAttributes());
} }
}); });