[WIP] fix #208
This commit is contained in:
parent
ee7ca45b91
commit
8f85016d8c
|
@ -16,12 +16,10 @@ function np(mainWindow) {
|
||||||
try {
|
try {
|
||||||
const nowplaying = require('itunes-nowplaying-mac')
|
const nowplaying = require('itunes-nowplaying-mac')
|
||||||
let value = await nowplaying()
|
let value = await nowplaying()
|
||||||
if (!value && npExec) {
|
|
||||||
const artwork = await nowplaying.getThumbnailBuffer(value.databaseID)
|
const artwork = await nowplaying.getThumbnailBuffer(value.databaseID)
|
||||||
const base64 = artwork.toString('base64')
|
const base64 = artwork.toString('base64')
|
||||||
value.artwork = 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)
|
console.error(error)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user