Fix: macOS NP
This commit is contained in:
parent
3ba4dee8a7
commit
d654b63bca
|
@ -141,7 +141,11 @@ function npCore(arg) {
|
|||
var regExp = new RegExp("{song}", "g");
|
||||
content = content.replace(regExp, arg.name);
|
||||
var regExp = new RegExp("{album}", "g");
|
||||
content = content.replace(regExp, arg.album);
|
||||
if(arg.album){
|
||||
if(arg.album.name){
|
||||
content = content.replace(regExp, arg.album.name);
|
||||
}
|
||||
}
|
||||
var regExp = new RegExp("{artist}", "g");
|
||||
content = content.replace(regExp, arg.artist);
|
||||
var regExp = new RegExp("{url}", "g");
|
||||
|
|
|
@ -15,7 +15,7 @@ function np(mainWindow) {
|
|||
if (platform == "darwin") {
|
||||
try {
|
||||
const nowplaying = require("itunes-nowplaying-mac");
|
||||
const value = await nowplaying.getRawData();
|
||||
const value = await nowplaying.getData();
|
||||
e.sender.webContents.send('itunes-np', value);
|
||||
} catch (error) {
|
||||
// エラーを返す
|
||||
|
|
Loading…
Reference in New Issue
Block a user