np
This commit is contained in:
parent
2a2607eb4b
commit
d1309a82ec
|
@ -148,6 +148,7 @@ async function npCore(arg) {
|
||||||
}
|
}
|
||||||
var flag = localStorage.getItem('artwork')
|
var flag = localStorage.getItem('artwork')
|
||||||
var platform = localStorage.getItem('platform')
|
var platform = localStorage.getItem('platform')
|
||||||
|
var aaw = {aaw: '', album: ''}
|
||||||
if (platform == 'win32') {
|
if (platform == 'win32') {
|
||||||
if (flag && arg.path) {
|
if (flag && arg.path) {
|
||||||
media(arg.path, 'image/png', 'new')
|
media(arg.path, 'image/png', 'new')
|
||||||
|
@ -157,7 +158,7 @@ async function npCore(arg) {
|
||||||
media(arg.artwork, 'image/png', 'new')
|
media(arg.artwork, 'image/png', 'new')
|
||||||
} else if (flag && localStorage.getItem('complete-artwork')) {
|
} else if (flag && localStorage.getItem('complete-artwork')) {
|
||||||
var q = arg.artist + ' ' + arg.album.name + ' ' + arg.name
|
var q = arg.artist + ' ' + arg.album.name + ' ' + arg.name
|
||||||
var aaw = await getUnknownAA(q)
|
aaw = await getUnknownAA(q)
|
||||||
postMessage(['bmpImage', [aaw.aaw, 0]], '*')
|
postMessage(['bmpImage', [aaw.aaw, 0]], '*')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,11 +169,11 @@ async function npCore(arg) {
|
||||||
if (arg.album.name) {
|
if (arg.album.name) {
|
||||||
content = content.replace(regExp, arg.album.name)
|
content = content.replace(regExp, arg.album.name)
|
||||||
} else {
|
} else {
|
||||||
if(aaw.album) content.replace(regExp, aaw.album)
|
if(aaw.album) content = content.replace(regExp, aaw.album)
|
||||||
content = content.replace(regExp, '-')
|
content = content.replace(regExp, '-')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(aaw.album) content.replace(regExp, aaw.album)
|
if(aaw.album) content = content.replace(regExp, aaw.album)
|
||||||
content = content.replace(regExp, '-')
|
content = content.replace(regExp, '-')
|
||||||
}
|
}
|
||||||
var regExp = new RegExp('{artist}', 'g')
|
var regExp = new RegExp('{artist}', 'g')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user