[web-remote] rebrand and manifest changes

This commit is contained in:
child_duckling 2022-01-16 18:38:46 -08:00
parent d7a8b31684
commit 0ba82d938e
3 changed files with 56 additions and 46 deletions

View file

@ -186,14 +186,16 @@ export class Win {
/* /*
* Remote Client (I had no idea how to add it to our existing express server, so I just made another one) -@quacksire * Remote Client (I had no idea how to add it to our existing express server, so I just made another one) -@quacksire
* TODO: Broadcast the remote so that /web-remote/ can connect
* https://github.com/ciderapp/Apple-Music-Electron/blob/818ed18940ff600d76eb59d22016723a75885cd5/resources/functions/handler.js#L1173
*/ */
const remote = express(); const remote = express();
remote.use(express.static(path.join(this.paths.srcPath, "./web-remote/"))) remote.use(express.static(path.join(this.paths.srcPath, "./web-remote/")))
remote.listen(this.remotePort, () => { remote.listen(this.remotePort, () => {
console.log(`Cider remote port: ${this.clientPort}`); console.log(`Cider remote port: ${this.remotePort}`);
if (firstRequest) { if (firstRequest) {
console.log("---- Ignore Me ;) ---"); console.log("---- Ignore Me ;) ---");
qrcode.generate(`http://${os.hostname}:${this.clientPort}/remote`); qrcode.generate(`http://${os.hostname}:${this.remotePort}/remote`);
console.log("---- Ignore Me ;) ---"); console.log("---- Ignore Me ;) ---");
/* /*
* *

View file

@ -71,16 +71,16 @@ var app = new Vue({
}, },
musicAppVariant() { musicAppVariant() {
if (navigator.userAgent.match(/Android/i)) { if (navigator.userAgent.match(/Android/i)) {
return "Apple Music"; return "Cider";
} else if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) { } else if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) {
return "Music"; return "Cider";
} else { } else {
if (navigator.userAgent.indexOf('Mac') > 0) { if (navigator.userAgent.indexOf('Mac') > 0) {
return 'Music'; return 'Music';
} else if (navigator.userAgent.indexOf('Win') > 0) { } else if (navigator.userAgent.indexOf('Win') > 0) {
return 'Apple Music Electron'; return 'Cider';
} else { } else {
return 'Apple Music Electron'; return 'Cider';
} }
} }
}, },
@ -465,8 +465,7 @@ var app = new Vue({
}, },
setMode(mode) { setMode(mode) {
switch (mode) { switch (mode) {
default: default: this.screen = "player"
this.screen = "player"
break; break;
case "miniplayer": case "miniplayer":
this.screen = "miniplayer" this.screen = "miniplayer"
@ -507,8 +506,7 @@ var app = new Vue({
socket.onmessage = (e) => { socket.onmessage = (e) => {
const response = JSON.parse(e.data); const response = JSON.parse(e.data);
switch (response.type) { switch (response.type) {
default: default: console.log(response);
console.log(response);
break; break;
case "musickitapi.search": case "musickitapi.search":
self.showArtist(response.data["artists"][0]["id"]); self.showArtist(response.data["artists"][0]["id"]);

View file

@ -4,11 +4,15 @@
"display": "standalone", "display": "standalone",
"scope": "/", "scope": "/",
"start_url": "/", "start_url": "/",
"name": "AME Remote", "name": "Cider Remote",
"short_name": "AME Remote", "short_name": "Cider Remote",
"description": "Apple Music Electron Remote", "description": "Cider Remote",
"icons": [ "developer": {
{ "name": "Cider Collective",
"url": "https://cider.sh?utm-source=manifest"
},
"homepage_url": "https://cider.sh?utm-source=manifest",
"icons": [{
"src": "/icon-192x192.png", "src": "/icon-192x192.png",
"sizes": "192x192", "sizes": "192x192",
"type": "image/png" "type": "image/png"
@ -28,5 +32,11 @@
"sizes": "512x512", "sizes": "512x512",
"type": "image/png" "type": "image/png"
} }
] ],
"protocol_handlers": [{
"protocol": "ext+cider",
"name": "Cider",
"uriTemplate": "/?url=%s"
}]
} }