Filter loop added

This commit is contained in:
Core 2022-06-16 14:47:52 +01:00
parent 23ad2640dc
commit 7850493c9e
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
3 changed files with 13 additions and 2 deletions

View file

@ -162,7 +162,7 @@ export default class lastfm {
* @private
*/
private scrobbleTrack(attributes: any): void {
if (!this._authenticated || !attributes || (this._scrobbleCache.track === attributes.lfmTrack.name)) return;
if (!this._authenticated || !attributes || (this._utils.getStoreValue("lastfm.filter_loop") && this._scrobbleCache.track === attributes.lfmTrack.name)) return;
if (this._scrobbleDelay) {
clearTimeout(this._scrobbleDelay);
@ -200,7 +200,7 @@ export default class lastfm {
}
private updateNowPlayingTrack(attributes: any): void {
if (!this._authenticated || !attributes || (this._nowPlayingCache.track === attributes.lfmTrack.name)) return;
if (!this._authenticated || !attributes || (this._utils.getStoreValue("lastfm.filter_loop") && this._nowPlayingCache.track === attributes.lfmTrack.name)) return;
const nowPlaying = {
'artist': attributes.lfmTrack.artist.name,