mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-15 04:11:47 +00:00
clarify button purpose
This commit is contained in:
@ -29,12 +29,9 @@ function Delete() {
|
|||||||
|
|
||||||
//New notification
|
//New notification
|
||||||
module.exports.notifyInteractive = function sendToaster(songInfo) {
|
module.exports.notifyInteractive = function sendToaster(songInfo) {
|
||||||
console.log("called toaster");
|
|
||||||
Delete();
|
Delete();
|
||||||
console.log("deleted");
|
|
||||||
//download image and get path
|
//download image and get path
|
||||||
let imgSrc = notificationImage(songInfo, true);
|
let imgSrc = notificationImage(songInfo, true);
|
||||||
console.log("got image");
|
|
||||||
toDelete = {
|
toDelete = {
|
||||||
//app id undefined - will break buttons
|
//app id undefined - will break buttons
|
||||||
title: songInfo.title || "Playing",
|
title: songInfo.title || "Playing",
|
||||||
@ -42,20 +39,19 @@ module.exports.notifyInteractive = function sendToaster(songInfo) {
|
|||||||
id: parseInt(Math.random() * 1000000, 10),
|
id: parseInt(Math.random() * 1000000, 10),
|
||||||
icon: imgSrc,
|
icon: imgSrc,
|
||||||
actions: [
|
actions: [
|
||||||
icons.previous, // Previous
|
icons.previous,
|
||||||
songInfo.isPaused ? icons.play : icons.pause,
|
songInfo.isPaused ? icons.play : icons.pause,
|
||||||
icons.next // Next
|
icons.next
|
||||||
],
|
],
|
||||||
sound: false,
|
sound: false,
|
||||||
};
|
};
|
||||||
console.log("sending notification");
|
|
||||||
//send notification
|
//send notification
|
||||||
notifier.notify(
|
notifier.notify(
|
||||||
toDelete,
|
toDelete,
|
||||||
(err, data) => {
|
(err, data) => {
|
||||||
// Will also wait until notification is closed.
|
// Will also wait until notification is closed.
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(`ERROR = ${err}\n DATA = ${data}`);
|
console.log(`ERROR = ${err.toString()}\n DATA = ${data}`);
|
||||||
}
|
}
|
||||||
switch (data) {
|
switch (data) {
|
||||||
//buttons
|
//buttons
|
||||||
|
|||||||
@ -19,7 +19,7 @@ module.exports = (win, options) => [
|
|||||||
},
|
},
|
||||||
...(is.windows() ?
|
...(is.windows() ?
|
||||||
[{
|
[{
|
||||||
label: "Interactive",
|
label: "Interactive Notifications",
|
||||||
type: "checkbox",
|
type: "checkbox",
|
||||||
checked: options.interactive,
|
checked: options.interactive,
|
||||||
click: (item) => setInteractive(options, item.checked)
|
click: (item) => setInteractive(options, item.checked)
|
||||||
|
|||||||
Reference in New Issue
Block a user