wip
This commit is contained in:
parent
3fe5676f44
commit
4f84ad6c91
|
@ -11,14 +11,20 @@ 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()
|
||||||
const artwork = await nowplaying.getThumbnailBuffer(value.databaseID)
|
try {
|
||||||
if(artwork) {
|
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)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.rrror(error)
|
||||||
|
e.sender.webContents.send('itunes-np', value)
|
||||||
}
|
}
|
||||||
e.sender.webContents.send('itunes-np', value)
|
|
||||||
} catch (error) {
|
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.rrror(error)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user