Fix: #108 NowPlaying of iTunes on macOS
This commit is contained in:
parent
d0ed9faf50
commit
61d4d7005e
|
@ -45,12 +45,8 @@ onmessage = function (e) {
|
|||
} else if (e.data[0] == "aboutData") {
|
||||
ipc.send('aboutData', "");
|
||||
} else if (e.data[0] == "itunes") {
|
||||
console.log("NowPlaying" + ipc.listenerCount('itunes-np'))
|
||||
if (ipc.listenerCount('itunes-np') > 1) {
|
||||
return false;
|
||||
} else {
|
||||
ipc.send("itunes", e.data[1])
|
||||
}
|
||||
console.log("NowPlaying")
|
||||
ipc.send("itunes", e.data[1])
|
||||
} else if (e.data[0] == "themeCSSRequest") {
|
||||
ipc.send('theme-css-request', e.data[1]);
|
||||
} else if (e.data[0] == "downloadButton") {
|
||||
|
@ -148,7 +144,7 @@ ipc.on('theme-json-create-complete', function (event, args) {
|
|||
postMessage(["ctLoad", ""], "*")
|
||||
});
|
||||
//spotify.js
|
||||
ipc.once('itunes-np', function (event, arg) {
|
||||
ipc.on('itunes-np', function (event, arg) {
|
||||
postMessage(["npCore", arg], "*")
|
||||
})
|
||||
//tips.js
|
||||
|
|
|
@ -22,6 +22,8 @@ function np(mainWindow) {
|
|||
console.error(error);
|
||||
e.sender.webContents.send('itunes-np', error);
|
||||
}
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user