mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-05-15 23:33:02 +02:00
Merge 456727c0e01b70d16713bc212f17125d011c4972 into 76769dfab3cd9e8f1b30e85d04f6dc3a9f99b514
This commit is contained in:
commit
ba7d538721
@ -28,6 +28,7 @@ let currentListenBrainzDelayId: ReturnType<typeof setTimeout>;
|
||||
let scrobbleWaitingForDelay = false;
|
||||
let wasJustPausedOrResumed = false;
|
||||
let currentMediaInfo: Options;
|
||||
let currentNotification: Electron.Notification;
|
||||
|
||||
const elements = {
|
||||
play: '*[data-test="play"]',
|
||||
@ -359,7 +360,9 @@ function updateMediaInfo(options: Options, notify: boolean) {
|
||||
currentMediaInfo = options;
|
||||
ipcRenderer.send(globalEvents.updateInfo, options);
|
||||
if (settingsStore.get(settings.notifications) && notify) {
|
||||
new Notification({ title: options.title, body: options.artists, icon: options.icon }).show();
|
||||
if (currentNotification) currentNotification.close();
|
||||
currentNotification = new Notification({ title: options.title, body: options.artists, icon: options.icon });
|
||||
currentNotification.show();
|
||||
}
|
||||
updateMpris(options);
|
||||
updateListenBrainz(options);
|
||||
|
Loading…
x
Reference in New Issue
Block a user