diff --git a/package.json b/package.json index a0c6fb47..db70d1b2 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "productName": "YouTube Music", "mac": { "identity": null, - "files": ["!plugins/{taskbar-mediacontrol,notifications/snoretoast}${/*}"], + "files": ["!plugins/taskbar-mediacontrol${/*}"], "target": [ { "target": "dmg", @@ -40,7 +40,7 @@ }, "linux": { "icon": "assets/generated/icons/png", - "files": ["!plugins/{touchbar,taskbar-mediacontrol,notifications/snoretoast}${/*}"], + "files": ["!plugins/{touchbar,taskbar-mediacontrol}${/*}"], "category": "AudioVideo", "target": [ "AppImage", diff --git a/plugins/notifications/back.js b/plugins/notifications/back.js index 2ca1f56a..f3282ed3 100644 --- a/plugins/notifications/back.js +++ b/plugins/notifications/back.js @@ -39,6 +39,6 @@ const setup = (options) => { module.exports = (win, options) => { // Register the callback for new song information is.windows() && options.interactive ? - require("./snoretoast/interactive")(win, options.unpauseNotification) : + require("./interactive")(win, options.unpauseNotification) : setup(options); }; diff --git a/plugins/notifications/snoretoast/interactive.js b/plugins/notifications/interactive.js similarity index 92% rename from plugins/notifications/snoretoast/interactive.js rename to plugins/notifications/interactive.js index 3f6c062c..0fc0f0c6 100644 --- a/plugins/notifications/snoretoast/interactive.js +++ b/plugins/notifications/interactive.js @@ -1,13 +1,10 @@ const { notificationImage, icons } = require("../utils"); const getSongControls = require('../../../providers/song-controls'); const registerCallback = require("../../../providers/song-info"); +const is = require("electron-is"); const WindowsToaster = require('node-notifier').WindowsToaster; -const notifier = new WindowsToaster({ - withFallback: true, - // see https://github.com/th-ch/youtube-music/pull/591 - customPath: require("path").join(__dirname, 'snoretoast-x64.exe') -}); +const notifier = new WindowsToaster({ withFallback: true }); //store song controls reference on launch let controls; @@ -54,7 +51,7 @@ function sendToaster(songInfo) { //download image and get path let imgSrc = notificationImage(songInfo, true); toDelete = { - appID: "com.github.th-ch.youtube-music", + appID: is.dev() ? undefined : "com.github.th-ch.youtube-music", title: songInfo.title || "Playing", message: songInfo.artist, id: parseInt(Math.random() * 1000000, 10), diff --git a/plugins/notifications/snoretoast/snoretoast-x64.exe b/plugins/notifications/snoretoast/snoretoast-x64.exe deleted file mode 100644 index e2e0bb90..00000000 Binary files a/plugins/notifications/snoretoast/snoretoast-x64.exe and /dev/null differ