WIP #317 last.fm

This commit is contained in:
cutls 2020-08-12 10:01:14 +09:00
parent 74d756d43b
commit 91bc8c8bdd

View File

@ -32,7 +32,7 @@ function spotifyDisconnect() {
console.error(error) console.error(error)
}) })
.then(function (json) { .then(function (json) {
if(!json.success) alert('error') if (!json.success) alert('error')
localStorage.removeItem('spotify-token') localStorage.removeItem('spotify-token')
checkSpotify() checkSpotify()
}) })
@ -188,9 +188,8 @@ function nowplaying(mode) {
var item = json.recenttracks.track[0] var item = json.recenttracks.track[0]
if (!item['@attr']) return false if (!item['@attr']) return false
var img = item.image[3]['#text'] var img = item.image[3]['#text']
var isImg = item.streamable * 1
var flag = localStorage.getItem('artwork') var flag = localStorage.getItem('artwork')
if (flag && isImg && img) { if (flag && img != 'https://lastfm.freetls.fastly.net/i/u/300x300/2a96cbd8b46e442fc41c2b86b821562f.png' && img) {
postMessage(['bmpImage', [img, 0]], '*') postMessage(['bmpImage', [img, 0]], '*')
} }
var content = localStorage.getItem('np-temp') var content = localStorage.getItem('np-temp')