various formatting, mpris patch, menubar patch

This commit is contained in:
Core 2022-03-11 05:51:35 +00:00
parent 900e011ad2
commit dfd3fe6271
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
7 changed files with 151 additions and 132 deletions

View file

@ -120,7 +120,7 @@ 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 * Math.min((self._store.lastfm.scrobble_after / 100),0.8)));
}, Math.round(attributes.durationInMillis * Math.min((self._store.lastfm.scrobble_after / 100), 0.8)));
}
private async updateNowPlayingSong(attributes: any) {
@ -264,14 +264,15 @@ export default class LastFMPlugin {
* @param attributes Music Attributes
*/
nowPlayingItemDidChangeLastFM(attributes: any): void {
if (!this._store.general.privateEnabled){
attributes.status = true
if (!this._store.lastfm.filterLoop) {
this._lastfm.cachedNowPlayingAttributes = false;
this._lastfm.cachedAttributes = false
if (!this._store.general.privateEnabled) {
attributes.status = true
if (!this._store.lastfm.filterLoop) {
this._lastfm.cachedNowPlayingAttributes = false;
this._lastfm.cachedAttributes = false
}
this.updateNowPlayingSong(attributes)
this.scrobbleSong(attributes)
}
this.updateNowPlayingSong(attributes)
this.scrobbleSong(attributes)}
}
}