Moved to Electron Notifications

This commit is contained in:
Core 2022-07-31 12:05:16 +01:00
parent 9228153172
commit c773058328
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
3 changed files with 99 additions and 11 deletions

View file

@ -44,6 +44,10 @@ const MusicKitInterop = {
global.ipcRenderer.send('lastfm:nowPlayingChange', attributes);
}
if (app.cfg.general.playbackNotifications && !document.hasFocus() && attributes.artistName && attributes.artwork && attributes.name) {
global.ipcRenderer.send('playbackNotifications:create', attributes);
}
if (MusicKit.getInstance().nowPlayingItem) {
await this.sleep(750);
MusicKit.getInstance().playbackRate = app.cfg.audio.playbackRate;