Merge remote-tracking branch 'origin/develop' into develop

# Conflicts:
#	src/main/plugins/lastfm.ts
This commit is contained in:
Core 2022-02-17 02:58:25 +00:00
commit 5b360e74fa
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6

View file

@ -118,7 +118,8 @@ export default class LastFMPlugin {
}
} else {
return console.log('[LastFM] Did not add ', attributes.name, '—', artist, 'because now playing a other song.');
}},Math.round(attributes.durationInMillis * (self._store.lastfm.scrobble_after / 100)));
}
}, Math.round(attributes.durationInMillis * (self._store.lastfm.scrobble_after / 100)));
}
private async updateNowPlayingSong(attributes: any) {
@ -258,17 +259,19 @@ export default class LastFMPlugin {
*/
onPlaybackStateDidChange(attributes: object): void {
this.updateNowPlayingSong(attributes)
this.scrobbleSong(attributes)
// this.scrobbleSong(attributes)
}
/**
* Runs on song change
* @param attributes Music Attributes
*/
nowPlayingItemDidChangeLastFM(attributes: object): void {
lfmItemChange(attributes: any): void {
attributes.status = true
if (!this._store.lastfm.filterLoop) {
this._lastfm.cachedNowPlayingAttributes = false;
this._lastfm.cachedAttributes = false}
this._lastfm.cachedAttributes = false
}
this.updateNowPlayingSong(attributes)
this.scrobbleSong(attributes)
}