Fix: WIP: album artworks
This commit is contained in:
parent
bc11e75d79
commit
3fe5676f44
|
@ -12,13 +12,13 @@ function np(mainWindow) {
|
||||||
const nowplaying = require('itunes-nowplaying-mac')
|
const nowplaying = require('itunes-nowplaying-mac')
|
||||||
let value = await nowplaying()
|
let value = await nowplaying()
|
||||||
const artwork = await nowplaying.getThumbnailBuffer(value.databaseID)
|
const artwork = await nowplaying.getThumbnailBuffer(value.databaseID)
|
||||||
const base64 = artwork.toString('base64')
|
if(artwork) {
|
||||||
value.artwork = base64
|
const base64 = artwork.toString('base64')
|
||||||
|
value.artwork = base64
|
||||||
|
}
|
||||||
e.sender.webContents.send('itunes-np', value)
|
e.sender.webContents.send('itunes-np', value)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// エラーを返す
|
|
||||||
console.error(error)
|
|
||||||
e.sender.webContents.send('itunes-np', error)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user