diff --git a/app/js/ui/spotify.js b/app/js/ui/spotify.js index 8d0e149d..beb5fc79 100644 --- a/app/js/ui/spotify.js +++ b/app/js/ui/spotify.js @@ -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"); diff --git a/app/main/np.js b/app/main/np.js index 00ff39ba..12055816 100644 --- a/app/main/np.js +++ b/app/main/np.js @@ -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) { // エラーを返す