fix AirPlay metadata , down el

This commit is contained in:
vapormusic 2022-10-01 11:37:26 +07:00
parent 9d6c438b1c
commit 65938a7b3b
2 changed files with 24 additions and 20 deletions

View file

@ -45,7 +45,7 @@
"@sentry/electron": "^4.0.2", "@sentry/electron": "^4.0.2",
"@sentry/integrations": "^7.14.0", "@sentry/integrations": "^7.14.0",
"adm-zip": "0.4.10", "adm-zip": "0.4.10",
"airtunes2": "github:ciderapp/node_airtunes2", "airtunes2": "git+https://github.com/ciderapp/node_airtunes2.git",
"castv2-client": "^1.2.0", "castv2-client": "^1.2.0",
"chokidar": "^3.5.3", "chokidar": "^3.5.3",
"discord-auto-rpc": "^1.0.17", "discord-auto-rpc": "^1.0.17",
@ -119,9 +119,9 @@
} }
], ],
"build": { "build": {
"electronVersion": "21.0.1", "electronVersion": "20.3.0",
"electronDownload": { "electronDownload": {
"version": "21.0.1+wvcus", "version": "20.3.0+wvcus",
"mirror": "https://github.com/castlabs/electron-releases/releases/download/v" "mirror": "https://github.com/castlabs/electron-releases/releases/download/v"
}, },
"appId": "cider", "appId": "cider",

View file

@ -229,7 +229,7 @@ export default class RAOP {
password: sepassword, password: sepassword,
txt: txt, txt: txt,
airplay2: airplay2dv, airplay2: airplay2dv,
debug: null, debug: true,
forceAlac: false, forceAlac: false,
}), }),
}); });
@ -442,22 +442,26 @@ export default class RAOP {
*/ */
onBeforeQuit(): void {} onBeforeQuit(): void {}
// /** /**
// * Runs on song change * Runs on song change
// * @param attributes Music Attributes * @param attributes Music Attributes
// */ */
// onNowPlayingItemDidChange(attributes: any): void { onNowPlayingItemDidChange(attributes: any): void {
// if (this.airtunes && this.device) { if (this.airtunes && this.devices.length > 0) {
// let title = attributes.name ? attributes.name : ''; let title = attributes?.name ?? "";
// let artist = attributes.artistName ? attributes.artistName : ''; let artist = attributes?.artistName ?? "";
// let album = attributes.albumName ? attributes.albumName : ''; let album = attributes?.albumName ?? "";
// let artworkURL = attributes?.artwork?.url?.replace('{w}', '1024').replace('{h}', '1024') ?? null; for (let i in this.devices) {
// console.log(this.device.key, title, artist, album); console.log(this.devices[i].controller.key, title, artist, album);
// this.airtunes.setTrackInfo(this.device.key, title, artist, album); this.airtunes.setTrackInfo(this.devices[i].controller.key, title, artist, album);
// if (artworkURL) }
// this.uploadImageAirplay(artworkURL) let artworkURL = attributes?.artwork?.url ?? null;
// }
// } if (artworkURL != null) {
this.uploadImageAirplay(artworkURL.replace("{w}", "1024").replace("{h}", "1024"));
}
}
}
/** /**
* Runs on playback State Change * Runs on playback State Change