diff --git a/app/js/ui/spotify.js b/app/js/ui/spotify.js index beb5fc79..0d73e9cd 100644 --- a/app/js/ui/spotify.js +++ b/app/js/ui/spotify.js @@ -134,8 +134,8 @@ function npCore(arg) { media(arg.path, "image/png", "new"); } } else if (platform == "darwin") { - if (flag && arg.existsArtwork) { - media(arg.artworks[0].data, "image/png", "new"); + if (flag && arg.artwork) { + media(arg.artwork, "image/png", "new"); } } var regExp = new RegExp("{song}", "g"); diff --git a/app/main/np.js b/app/main/np.js index 01f1c067..d8146de3 100644 --- a/app/main/np.js +++ b/app/main/np.js @@ -15,10 +15,11 @@ function np(mainWindow) { if (platform == "darwin") { try { const nowplaying = require("itunes-nowplaying-mac"); - const value = await nowplaying(); + let value = await nowplaying(); const artwork = await nowplaying.getThumbnailBuffer(value.databaseID); - console.log(artwork) + const base64 = artwork.toString('base64'); + value.artwork = base64 e.sender.webContents.send('itunes-np', value); } catch (error) { // エラーを返す