Fix: WIP: album artworks

This commit is contained in:
cutls 2020-01-23 00:49:36 +09:00
parent bc11e75d79
commit 3fe5676f44

View File

@ -12,13 +12,13 @@ function np(mainWindow) {
const nowplaying = require('itunes-nowplaying-mac')
let value = await nowplaying()
const artwork = await nowplaying.getThumbnailBuffer(value.databaseID)
const base64 = artwork.toString('base64')
value.artwork = base64
if(artwork) {
const base64 = artwork.toString('base64')
value.artwork = base64
}
e.sender.webContents.send('itunes-np', value)
} catch (error) {
// エラーを返す
console.error(error)
e.sender.webContents.send('itunes-np', error)
}
} else {
}