Nowplaying on macOS with an album artwork

This commit is contained in:
cutls 2019-03-20 04:02:59 -07:00
parent 25662e8736
commit e36379de44
4 changed files with 17 additions and 12 deletions

View File

@ -134,6 +134,9 @@ function nowplaying(mode){
if(flag && arg.path){ if(flag && arg.path){
media(arg.path,"image/png","new"); media(arg.path,"image/png","new");
} }
if(flag && arg.artworks[0].path){
ipc.send('bmp-image', [arg.artworks[0].path,0]);
}
var regExp = new RegExp("{song}", "g"); var regExp = new RegExp("{song}", "g");
content = content.replace(regExp, arg.name); content = content.replace(regExp, arg.name);
var regExp = new RegExp("{album}", "g"); var regExp = new RegExp("{album}", "g");

5
app/package-lock.json generated
View File

@ -1601,9 +1601,8 @@
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
}, },
"itunes-nowplaying-mac": { "itunes-nowplaying-mac": {
"version": "0.2.3", "version": "github:rinsuki/itunes-nowplaying-mac#faf0f53c39d5f895eab9afadbac762914693a1fd",
"resolved": "github:rinsuki/itunes-nowplaying-mac#25e1902f83a609c759e1c6be8d8a3162a280b87f", "from": "github:rinsuki/itunes-nowplaying-mac#pull/1/head"
"optional": true
}, },
"jimp": { "jimp": {
"version": "0.2.28", "version": "0.2.28",

View File

@ -48,8 +48,8 @@
"vue": "^2.6.9" "vue": "^2.6.9"
}, },
"optionalDependencies": { "optionalDependencies": {
"itunes-nowplaying-mac": "github:rinsuki/itunes-nowplaying-mac#pull/1/head", "nowplaying-node": "^0.1.3",
"nowplaying-node": "^0.1.3" "itunes-nowplaying-mac": "github:rinsuki/itunes-nowplaying-mac#pull/1/head"
}, },
"build": { "build": {
"productName": "TheDesk", "productName": "TheDesk",
@ -70,7 +70,10 @@
"applicationId": "Cutls.TheDesk", "applicationId": "Cutls.TheDesk",
"publisherDisplayName": "Cutls", "publisherDisplayName": "Cutls",
"publisher": "CN=629757F5-A5EE-474F-9562-B304A89A9FD1", "publisher": "CN=629757F5-A5EE-474F-9562-B304A89A9FD1",
"languages":["JA-JP","EN-US"] "languages": [
"JA-JP",
"EN-US"
]
}, },
"nsis": { "nsis": {
"oneClick": false, "oneClick": false,