From 2d7d1272666386784e0e294c847ed05167391b82 Mon Sep 17 00:00:00 2001 From: cutls Date: Tue, 7 Apr 2020 15:53:53 +0900 Subject: [PATCH] Some bugs, quality up on #208 --- .gitignore | 1 + app/js/ui/spotify.js | 6 +++--- app/main/np.js | 1 + app/package.json | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 9774729e..4e64f931 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ app/view/es-AR app/git *.code-workspace releasenote.md +app/yarn-error.log diff --git a/app/js/ui/spotify.js b/app/js/ui/spotify.js index 8920ceb5..d3c35f94 100644 --- a/app/js/ui/spotify.js +++ b/app/js/ui/spotify.js @@ -156,7 +156,7 @@ async function npCore(arg) { if (flag && arg.artwork) { media(arg.artwork, "image/png", "new"); } 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; postMessage(["bmpImage", [await getUnknownAA(q), 0]], "*"); } } @@ -211,6 +211,6 @@ async function getUnknownAA(q) { if(!json.resultCount) { return [] } - const data = json.results - return data[0].artworkUrl100 + const data = json.results[0].artworkUrl100 + return data.replace(/100x100/, '512x512') } \ No newline at end of file diff --git a/app/main/np.js b/app/main/np.js index 14ca1205..e6a9c0b7 100644 --- a/app/main/np.js +++ b/app/main/np.js @@ -25,6 +25,7 @@ function np(mainWindow) { } catch (error) { console.error(error) + e.sender.webContents.send('itunes-np', error) } } else { } diff --git a/app/package.json b/app/package.json index b94f5837..0480b1dd 100644 --- a/app/package.json +++ b/app/package.json @@ -66,7 +66,7 @@ "vue": "^2.6.11" }, "optionalDependencies": { - "itunes-nowplaying-mac": "0.3.1" + "itunes-nowplaying-mac": "git://github.com/cutls/itunes-nowplaying-mac" }, "devDependencies": { "chokidar": "^3.3.1",