Merge pull request #35 from lucasduartesobreira/main
This commit is contained in:
commit
124818c634
1 changed files with 4 additions and 4 deletions
|
@ -543,15 +543,15 @@ const app = new Vue({
|
||||||
app.loadLyrics()
|
app.loadLyrics()
|
||||||
|
|
||||||
// Playback Notifications
|
// Playback Notifications
|
||||||
if ((app.platform === "darwin" || app.platform === "linux") && !document.hasFocus()) {
|
if ((app.platform === "darwin" || app.platform === "linux") && !document.hasFocus() && a.artistName && a.artwork && a.name) {
|
||||||
if (this.notification) {
|
if (this.notification) {
|
||||||
this.notification.close()
|
this.notification.close()
|
||||||
}
|
}
|
||||||
this.notification = new Notification(a.name, {
|
this.notification = new Notification(a.name, {
|
||||||
body: a.artistName,
|
body: a.artistName,
|
||||||
icon: (a.artwork.url.replace('/{w}x{h}bb', '/512x512bb')).replace('/2000x2000bb', '/35x35bb'),
|
icon: a.artwork.url.replace('/{w}x{h}bb', '/512x512bb').replace('/2000x2000bb', '/35x35bb'),
|
||||||
silent: true
|
silent: true,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue