fix AirPlay metadata , down el
This commit is contained in:
parent
9d6c438b1c
commit
65938a7b3b
2 changed files with 24 additions and 20 deletions
|
@ -45,7 +45,7 @@
|
|||
"@sentry/electron": "^4.0.2",
|
||||
"@sentry/integrations": "^7.14.0",
|
||||
"adm-zip": "0.4.10",
|
||||
"airtunes2": "github:ciderapp/node_airtunes2",
|
||||
"airtunes2": "git+https://github.com/ciderapp/node_airtunes2.git",
|
||||
"castv2-client": "^1.2.0",
|
||||
"chokidar": "^3.5.3",
|
||||
"discord-auto-rpc": "^1.0.17",
|
||||
|
@ -119,9 +119,9 @@
|
|||
}
|
||||
],
|
||||
"build": {
|
||||
"electronVersion": "21.0.1",
|
||||
"electronVersion": "20.3.0",
|
||||
"electronDownload": {
|
||||
"version": "21.0.1+wvcus",
|
||||
"version": "20.3.0+wvcus",
|
||||
"mirror": "https://github.com/castlabs/electron-releases/releases/download/v"
|
||||
},
|
||||
"appId": "cider",
|
||||
|
|
|
@ -229,7 +229,7 @@ export default class RAOP {
|
|||
password: sepassword,
|
||||
txt: txt,
|
||||
airplay2: airplay2dv,
|
||||
debug: null,
|
||||
debug: true,
|
||||
forceAlac: false,
|
||||
}),
|
||||
});
|
||||
|
@ -442,22 +442,26 @@ export default class RAOP {
|
|||
*/
|
||||
onBeforeQuit(): void {}
|
||||
|
||||
// /**
|
||||
// * Runs on song change
|
||||
// * @param attributes Music Attributes
|
||||
// */
|
||||
// onNowPlayingItemDidChange(attributes: any): void {
|
||||
// if (this.airtunes && this.device) {
|
||||
// let title = attributes.name ? attributes.name : '';
|
||||
// let artist = attributes.artistName ? attributes.artistName : '';
|
||||
// let album = attributes.albumName ? attributes.albumName : '';
|
||||
// let artworkURL = attributes?.artwork?.url?.replace('{w}', '1024').replace('{h}', '1024') ?? null;
|
||||
// console.log(this.device.key, title, artist, album);
|
||||
// this.airtunes.setTrackInfo(this.device.key, title, artist, album);
|
||||
// if (artworkURL)
|
||||
// this.uploadImageAirplay(artworkURL)
|
||||
// }
|
||||
// }
|
||||
/**
|
||||
* Runs on song change
|
||||
* @param attributes Music Attributes
|
||||
*/
|
||||
onNowPlayingItemDidChange(attributes: any): void {
|
||||
if (this.airtunes && this.devices.length > 0) {
|
||||
let title = attributes?.name ?? "";
|
||||
let artist = attributes?.artistName ?? "";
|
||||
let album = attributes?.albumName ?? "";
|
||||
for (let i in this.devices) {
|
||||
console.log(this.devices[i].controller.key, title, artist, album);
|
||||
this.airtunes.setTrackInfo(this.devices[i].controller.key, title, artist, album);
|
||||
}
|
||||
let artworkURL = attributes?.artwork?.url ?? null;
|
||||
|
||||
if (artworkURL != null) {
|
||||
this.uploadImageAirplay(artworkURL.replace("{w}", "1024").replace("{h}", "1024"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs on playback State Change
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue