lastfm changes

This commit is contained in:
vapormusic 2022-02-17 09:22:36 +07:00
parent cb82ff482d
commit 1ad805c04e

View file

@ -257,20 +257,22 @@ export default class LastFMPlugin {
* @param attributes Music Attributes (attributes.status = current state) * @param attributes Music Attributes (attributes.status = current state)
*/ */
onPlaybackStateDidChange(attributes: object): void { onPlaybackStateDidChange(attributes: object): void {
this.updateNowPlayingSong(attributes) this.updateNowPlayingSong(attributes)
this.scrobbleSong(attributes) // this.scrobbleSong(attributes)
} }
/** /**
* Runs on song change * Runs on song change
* @param attributes Music Attributes * @param attributes Music Attributes
*/ */
lfmItemChange(attributes: object): void { lfmItemChange(attributes: any): void {
attributes.status = true
if (!this._store.lastfm.filterLoop){ if (!this._store.lastfm.filterLoop){
this._lastfm.cachedNowPlayingAttributes = false; this._lastfm.cachedNowPlayingAttributes = false;
this._lastfm.cachedAttributes = false} this._lastfm.cachedAttributes = false
}
this.updateNowPlayingSong(attributes) this.updateNowPlayingSong(attributes)
this.scrobbleSong(attributes) this.scrobbleSong(attributes)
} }
} }