mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2024-11-22 13:32:42 +01:00
Fix bug where it does not run if condition
This commit is contained in:
parent
38c1f05c35
commit
de8a5a1b07
@ -377,8 +377,13 @@ function updateMediaInfo(options: Options, notify: boolean) {
|
|||||||
};
|
};
|
||||||
player.playbackStatus = options.status == statuses.paused ? "Paused" : "Playing";
|
player.playbackStatus = options.status == statuses.paused ? "Paused" : "Playing";
|
||||||
}
|
}
|
||||||
if (settingsStore.get(settings.ListenBrainz.enabled) && (ListenBrainzStore.get("OldData") as string[][1]) !== options.title) {
|
if (settingsStore.get(settings.ListenBrainz.enabled)) {
|
||||||
|
const data = ListenBrainzStore.get("OldData") as string[];
|
||||||
|
if (data && data[1] !== options.title) {
|
||||||
ListenBrainz.scrobble(options.title, options.artists, options.status, convertDuration(options.duration));
|
ListenBrainz.scrobble(options.title, options.artists, options.status, convertDuration(options.duration));
|
||||||
|
} else if (!data) {
|
||||||
|
ListenBrainz.scrobble(options.title, options.artists, options.status, convertDuration(options.duration));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user