Merge branch 'main' of https://github.com/ciderapp/Cider
This commit is contained in:
commit
6374e04b5d
13 changed files with 184 additions and 97 deletions
|
@ -8,7 +8,7 @@ executors:
|
|||
|
||||
orbs: # Add orbs to your configuration
|
||||
jira: circleci/jira@1.0.5 # invokes the Jira orb, making its commands accessible
|
||||
|
||||
gh: circleci/github-cli@2.1
|
||||
# The jobs for this project
|
||||
jobs:
|
||||
prepare-build:
|
||||
|
@ -111,14 +111,7 @@ jobs:
|
|||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/Cider/
|
||||
- run:
|
||||
name: Installing GitHub Command Line Interface
|
||||
command: |
|
||||
sudo apt-get update -y
|
||||
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
|
||||
sudo apt-get update -y
|
||||
sudo apt install -y gh
|
||||
- gh/install
|
||||
- run:
|
||||
name: Move Build Files
|
||||
command: |
|
||||
|
@ -143,9 +136,11 @@ jobs:
|
|||
if [[ "${APP_VERSION}" = *"beta"* ]]; then
|
||||
echo $'**Beta Release**\nA full changelog is unavailable, but you can view the branch comparison [here](https://github.com/ciderapp/cider/compare/stable...main).\nThese builds are considered bleeding edge, expect bugs and please do not use this as a representation of the fu ll app.\nOur full support disclaimer can be found [here](https://docs.cider.sh/support/disclaimer#support-nightly-beta-releases).' > release-notes.md
|
||||
gh release create "v${APP_VERSION}" --prerelease --title "Cider Version ${APP_VERSION} (${CIRCLE_BRANCH})" --notes-file release-notes.md -R ciderapp/cider-releases ~/Cider/dist/artifacts/*.deb ~/Cider/dist/artifacts/*.AppImage ~/Cider/dist/artifacts/*.snap ~/Cider/dist/artifacts/*.exe ~/Cider/dist/artifacts/*.yml ~/Cider/dist/artifacts/*.blockmap
|
||||
curl http://129.146.42.180/api/v1/github/sync/main
|
||||
else
|
||||
echo $'**Stable Release**\nA full changelog is unavailable, but you can view the branch comparison [here](https://github.com/ciderapp/cider/compare/stable...main).\nThese are the most stable builds we can provide. If you experience any issues, please report them [here](https://github.com/ciderapp/cider/issues/new).\nOur full support disclaimer can be found [here](https://docs.cider.sh/support/disclaimer#support-releases).' > release-notes.md
|
||||
gh release create "v${APP_VERSION}" --title "Cider Version ${APP_VERSION} (${CIRCLE_BRANCH})" --notes-file release-notes.md -R ciderapp/cider-releases ~/Cider/dist/artifacts/*.deb ~/Cider/dist/artifacts/*.AppImage ~/Cider/dist/artifacts/*.snap ~/Cider/dist/artifacts/*.exe ~/Cider/dist/artifacts/*.yml ~/Cider/dist/artifacts/*.blockmap
|
||||
curl http://129.146.42.180/api/v1/github/sync/stable
|
||||
fi;
|
||||
|
||||
# Orchestrate our job run sequence
|
||||
|
|
13
.github/workflows/build-macos.yml
vendored
13
.github/workflows/build-macos.yml
vendored
|
@ -125,3 +125,16 @@ jobs:
|
|||
repo_token: ${{ secrets.RELEASE_TOKEN }}
|
||||
file: dist/Cider-${{ env.APP_VERSION }}-universal.pkg
|
||||
tag: v${{ env.APP_VERSION }}
|
||||
- name: Trigger Bot Sync (main)
|
||||
uses: indiesdev/curl@v1.1
|
||||
with:
|
||||
url: http://129.146.42.180/api/v1/github/sync/main
|
||||
log-response: true
|
||||
timeout: 60000
|
||||
- name: Trigger Bot Sync (stable)
|
||||
uses: indiesdev/curl@v1.1
|
||||
with:
|
||||
url: http://129.146.42.180/api/v1/github/sync/stable
|
||||
log-response: true
|
||||
timeout: 60000
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
"run-script-os": "^1.1.6",
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-md5": "1.2.11",
|
||||
"upnp-mediarenderer-client": "github:vapormusic/node-upnp-mediarenderer-client",
|
||||
"v8-compile-cache": "^2.3.0",
|
||||
"wallpaper": "5.0.1",
|
||||
"ws": "^8.8.1",
|
||||
|
@ -78,9 +79,9 @@
|
|||
"@types/adm-zip": "^0.5.0",
|
||||
"@types/discord-rpc": "4.0.3",
|
||||
"@types/express": "^4.17.13",
|
||||
"@types/node": "^18.7.13",
|
||||
"@types/qrcode-terminal": "^0.12.0",
|
||||
"@types/ws": "^8.5.3",
|
||||
"@types/node": "^18.7.13",
|
||||
"electron": "git+https://github.com/castlabs/electron-releases.git",
|
||||
"electron-builder": "^23.0.2",
|
||||
"electron-builder-notarize-pkg": "^1.2.0",
|
||||
|
|
76
pnpm-lock.yaml
generated
76
pnpm-lock.yaml
generated
|
@ -43,6 +43,7 @@ specifiers:
|
|||
source-map-support: ^0.5.21
|
||||
ts-md5: 1.2.11
|
||||
typescript: ^4.7.4
|
||||
upnp-mediarenderer-client: github:vapormusic/node-upnp-mediarenderer-client
|
||||
v8-compile-cache: ^2.3.0
|
||||
vue-devtools: ^5.1.4
|
||||
wallpaper: 5.0.1
|
||||
|
@ -55,7 +56,7 @@ dependencies:
|
|||
'@sentry/electron': 4.0.0
|
||||
'@sentry/integrations': 7.11.1
|
||||
adm-zip: 0.4.10
|
||||
airtunes2: github.com/ciderapp/node_airtunes2/63e3a34a551aa700f89b622d65d19f52f48548ce
|
||||
airtunes2: github.com/ciderapp/node_airtunes2/909bc9ae208731bfe286cc6ee46d075aa56766eb
|
||||
castv2-client: 1.2.0
|
||||
chokidar: 3.5.3
|
||||
discord-auto-rpc: 1.0.17
|
||||
|
@ -81,6 +82,7 @@ dependencies:
|
|||
run-script-os: 1.1.6
|
||||
source-map-support: 0.5.21
|
||||
ts-md5: 1.2.11
|
||||
upnp-mediarenderer-client: github.com/vapormusic/node-upnp-mediarenderer-client/d4856931500026eb6c4c67b3eb12c1c34755627e
|
||||
v8-compile-cache: 2.3.0
|
||||
wallpaper: 5.0.1
|
||||
ws: 8.8.1
|
||||
|
@ -94,7 +96,7 @@ devDependencies:
|
|||
'@types/node': 18.7.13
|
||||
'@types/qrcode-terminal': 0.12.0
|
||||
'@types/ws': 8.5.3
|
||||
electron: github.com/castlabs/electron-releases/a1749958b51da6ce1596992260cbacb602c23762
|
||||
electron: github.com/castlabs/electron-releases/8ca09f8539dc0c3f5a57af3fe23fb2db9661ab68
|
||||
electron-builder: 23.3.3
|
||||
electron-builder-notarize-pkg: 1.2.0
|
||||
electron-webpack: 2.8.2_webpack@5.74.0
|
||||
|
@ -3459,6 +3461,16 @@ packages:
|
|||
/concat-map/0.0.1:
|
||||
resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==}
|
||||
|
||||
/concat-stream/1.6.2:
|
||||
resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==}
|
||||
engines: {'0': node >= 0.8}
|
||||
dependencies:
|
||||
buffer-from: 1.1.2
|
||||
inherits: 2.0.4
|
||||
readable-stream: 2.3.7
|
||||
typedarray: 0.0.6
|
||||
dev: false
|
||||
|
||||
/conf/10.2.0:
|
||||
resolution: {integrity: sha512-8fLl9F04EJqjSqH+QjITQfJF8BrOVaYr1jewVgSRAEWePfxT0sku4w2hrGQ60BC/TNLGQ2pgxNlTbWQmMPFvXg==}
|
||||
engines: {node: '>=12'}
|
||||
|
@ -4285,6 +4297,13 @@ packages:
|
|||
mkdirp: 0.5.6
|
||||
dev: false
|
||||
|
||||
/elementtree/0.1.7:
|
||||
resolution: {integrity: sha512-wkgGT6kugeQk/P6VZ/f4T+4HB41BVgNBq5CDIZVbQ02nvTVqAiVTbskxxu3eA/X96lMlfYOwnLQpN2v5E1zDEg==}
|
||||
engines: {node: '>= 0.4.0'}
|
||||
dependencies:
|
||||
sax: 1.1.4
|
||||
dev: false
|
||||
|
||||
/elliptic/6.5.4:
|
||||
resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==}
|
||||
dependencies:
|
||||
|
@ -6064,7 +6083,6 @@ packages:
|
|||
|
||||
/isarray/1.0.0:
|
||||
resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==}
|
||||
dev: true
|
||||
|
||||
/isbinaryfile/3.0.3:
|
||||
resolution: {integrity: sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==}
|
||||
|
@ -6891,6 +6909,11 @@ packages:
|
|||
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
|
||||
dev: true
|
||||
|
||||
/network-address/1.1.2:
|
||||
resolution: {integrity: sha512-Q6878fmvItA1mE7H9Il46lONgFgTzX2f98zkS0c2YlkCACzNjwvum/8Kq693IQpxe9zy+w+Zm/4p0wQreLEtZw==}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/nice-try/1.0.5:
|
||||
resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==}
|
||||
dev: true
|
||||
|
@ -7570,7 +7593,6 @@ packages:
|
|||
|
||||
/process-nextick-args/2.0.1:
|
||||
resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
|
||||
dev: true
|
||||
|
||||
/process/0.11.10:
|
||||
resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==}
|
||||
|
@ -7808,7 +7830,6 @@ packages:
|
|||
safe-buffer: 5.1.2
|
||||
string_decoder: 1.1.1
|
||||
util-deprecate: 1.0.2
|
||||
dev: true
|
||||
|
||||
/readable-stream/3.6.0:
|
||||
resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==}
|
||||
|
@ -8097,7 +8118,6 @@ packages:
|
|||
|
||||
/safe-buffer/5.1.2:
|
||||
resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
|
||||
dev: true
|
||||
|
||||
/safe-buffer/5.2.1:
|
||||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
||||
|
@ -8117,6 +8137,10 @@ packages:
|
|||
truncate-utf8-bytes: 1.0.2
|
||||
dev: true
|
||||
|
||||
/sax/1.1.4:
|
||||
resolution: {integrity: sha512-5f3k2PbGGp+YtKJjOItpg3P99IMD84E4HOvcfleTb5joCHNXYLsR9yWFPOYGgaeMPDubQILTCMdsFb2OMeOjtg==}
|
||||
dev: false
|
||||
|
||||
/sax/1.2.4:
|
||||
resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==}
|
||||
|
||||
|
@ -8694,7 +8718,6 @@ packages:
|
|||
resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==}
|
||||
dependencies:
|
||||
safe-buffer: 5.1.2
|
||||
dev: true
|
||||
|
||||
/string_decoder/1.3.0:
|
||||
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
|
||||
|
@ -9081,6 +9104,10 @@ packages:
|
|||
is-typedarray: 1.0.0
|
||||
dev: true
|
||||
|
||||
/typedarray/0.0.6:
|
||||
resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
|
||||
dev: false
|
||||
|
||||
/typescript/4.7.4:
|
||||
resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==}
|
||||
engines: {node: '>=4.2.0'}
|
||||
|
@ -9838,10 +9865,10 @@ packages:
|
|||
got: 11.8.5
|
||||
dev: false
|
||||
|
||||
github.com/castlabs/electron-releases/a1749958b51da6ce1596992260cbacb602c23762:
|
||||
resolution: {tarball: https://codeload.github.com/castlabs/electron-releases/tar.gz/a1749958b51da6ce1596992260cbacb602c23762}
|
||||
github.com/castlabs/electron-releases/8ca09f8539dc0c3f5a57af3fe23fb2db9661ab68:
|
||||
resolution: {tarball: https://codeload.github.com/castlabs/electron-releases/tar.gz/8ca09f8539dc0c3f5a57af3fe23fb2db9661ab68}
|
||||
name: electron
|
||||
version: 21.0.0-alpha.5
|
||||
version: 21.0.0-beta.1
|
||||
engines: {node: '>= 10.17.0'}
|
||||
hasBin: true
|
||||
requiresBuild: true
|
||||
|
@ -9878,8 +9905,8 @@ packages:
|
|||
- supports-color
|
||||
dev: false
|
||||
|
||||
github.com/ciderapp/node_airtunes2/63e3a34a551aa700f89b622d65d19f52f48548ce:
|
||||
resolution: {tarball: https://codeload.github.com/ciderapp/node_airtunes2/tar.gz/63e3a34a551aa700f89b622d65d19f52f48548ce}
|
||||
github.com/ciderapp/node_airtunes2/909bc9ae208731bfe286cc6ee46d075aa56766eb:
|
||||
resolution: {tarball: https://codeload.github.com/ciderapp/node_airtunes2/tar.gz/909bc9ae208731bfe286cc6ee46d075aa56766eb}
|
||||
name: airtunes2
|
||||
version: 2.3.2
|
||||
hasBin: true
|
||||
|
@ -9936,6 +9963,31 @@ packages:
|
|||
readable-stream: 1.1.14
|
||||
dev: false
|
||||
|
||||
github.com/vapormusic/node-upnp-device-client/371819a856573e3624768bd0a113ac6dc084053d:
|
||||
resolution: {tarball: https://codeload.github.com/vapormusic/node-upnp-device-client/tar.gz/371819a856573e3624768bd0a113ac6dc084053d}
|
||||
name: upnp-device-client
|
||||
version: 1.0.2
|
||||
dependencies:
|
||||
concat-stream: 1.6.2
|
||||
debug: 2.6.9
|
||||
elementtree: 0.1.7
|
||||
network-address: 1.1.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
github.com/vapormusic/node-upnp-mediarenderer-client/d4856931500026eb6c4c67b3eb12c1c34755627e:
|
||||
resolution: {tarball: https://codeload.github.com/vapormusic/node-upnp-mediarenderer-client/tar.gz/d4856931500026eb6c4c67b3eb12c1c34755627e}
|
||||
name: upnp-mediarenderer-client
|
||||
version: 1.4.0
|
||||
dependencies:
|
||||
debug: 2.6.9
|
||||
elementtree: 0.1.7
|
||||
upnp-device-client: github.com/vapormusic/node-upnp-device-client/371819a856573e3624768bd0a113ac6dc084053d
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
dev: false
|
||||
|
||||
github.com/wavesplatform/curve25519-js/cae68782564b83ffa1c7c757e40a3944cb140290:
|
||||
resolution: {tarball: https://codeload.github.com/wavesplatform/curve25519-js/tar.gz/cae68782564b83ffa1c7c757e40a3944cb140290}
|
||||
name: axlsign
|
||||
|
|
|
@ -2,6 +2,7 @@ import * as electron from "electron";
|
|||
import * as os from "os";
|
||||
import { resolve } from "path";
|
||||
import * as CiderReceiver from "../base/castreceiver";
|
||||
const MediaRendererClient = require("upnp-mediarenderer-client");
|
||||
|
||||
export default class ChromecastPlugin {
|
||||
/**
|
||||
|
@ -28,6 +29,7 @@ export default class ChromecastPlugin {
|
|||
private connectedHosts: any = {};
|
||||
private connectedPlayer: any;
|
||||
private ciderPort: any = 9000;
|
||||
private scanCount: any = 0;
|
||||
// private server = false;
|
||||
// private bufcount = 0;
|
||||
// private bufcount2 = 0;
|
||||
|
@ -67,19 +69,15 @@ export default class ChromecastPlugin {
|
|||
|
||||
ssdpBrowser.search("urn:dial-multiscreen-org:device:dial:1");
|
||||
|
||||
// // actual upnp devices
|
||||
// if (app.cfg.get("audio.enableDLNA")) {
|
||||
// let ssdpBrowser2 = new Client();
|
||||
// ssdpBrowser2.on('response', (headers, statusCode, rinfo) => {
|
||||
// var location = getLocation(headers);
|
||||
// if (location != null) {
|
||||
// this.getServiceDescription(location, rinfo.address);
|
||||
// }
|
||||
|
||||
// });
|
||||
// ssdpBrowser2.search('urn:schemas-upnp-org:device:MediaRenderer:1');
|
||||
|
||||
// }
|
||||
// actual upnp devices
|
||||
let ssdpBrowser2 = new Client();
|
||||
ssdpBrowser2.on("response", (headers: any, statusCode: any, rinfo: any) => {
|
||||
var location = getLocation(headers);
|
||||
if (location != null) {
|
||||
this.getServiceDescription(location, rinfo.address);
|
||||
}
|
||||
});
|
||||
ssdpBrowser2.search("urn:schemas-upnp-org:device:MediaRenderer:1");
|
||||
} catch (e) {
|
||||
console.log("Search GC err", e);
|
||||
}
|
||||
|
@ -257,26 +255,29 @@ export default class ChromecastPlugin {
|
|||
});
|
||||
} else {
|
||||
// upnp devices
|
||||
//try {
|
||||
// client = new MediaRendererClient(UPNPDesc);
|
||||
// const options = {
|
||||
// autoplay: true,
|
||||
// contentType: 'audio/x-wav',
|
||||
// dlnaFeatures: 'DLNA.ORG_PN=-;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01700000000000000000000000000000',
|
||||
// metadata: {
|
||||
// title: 'Apple Music Electron',
|
||||
// creator: 'Streaming ...',
|
||||
// type: 'audio', // can be 'video', 'audio' or 'image'
|
||||
// // url: 'http://' + getIp() + ':' + server.address().port + '/',
|
||||
// // protocolInfo: 'DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000;
|
||||
// }
|
||||
// };
|
||||
// client.load('http://' + getIp() + ':' + server.address().port + '/a.wav', options, function (err, _result) {
|
||||
// if (err) throw err;
|
||||
// console.log('playing ...');
|
||||
// });
|
||||
// } catch (e) {
|
||||
// }
|
||||
try {
|
||||
let client = new MediaRendererClient(UPNPDesc);
|
||||
const options = {
|
||||
autoplay: true,
|
||||
contentType: "audio/x-wav",
|
||||
dlnaFeatures: "DLNA.ORG_PN=-;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01700000000000000000000000000000",
|
||||
metadata: {
|
||||
title: "Cider",
|
||||
creator: "Streaming ...",
|
||||
type: "audio", // can be 'video', 'audio' or 'image'
|
||||
// url: 'http://' + getIp() + ':' + server.address().port + '/',
|
||||
// protocolInfo: 'DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000;
|
||||
},
|
||||
};
|
||||
client.load("http://" + this.getIp() + ":" + this.ciderPort + "/audio.wav", options, function (err: any, _result: any) {
|
||||
if (err) throw err;
|
||||
console.log("playing ...");
|
||||
});
|
||||
if (!this.connectedHosts[device.host]) {
|
||||
this.connectedHosts[device.host] = client;
|
||||
this.activeConnections.push(client);
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -318,6 +319,10 @@ export default class ChromecastPlugin {
|
|||
});
|
||||
|
||||
electron.ipcMain.on("getChromeCastDevices", (_event, _data) => {
|
||||
if (this.scanCount++ == 2) {
|
||||
this.scanCount = 0;
|
||||
this.castDevices = [];
|
||||
}
|
||||
this.searchForGCDevices();
|
||||
});
|
||||
|
||||
|
|
|
@ -216,7 +216,8 @@ export default class RAOP {
|
|||
password: sepassword,
|
||||
txt: txt,
|
||||
airplay2: airplay2dv,
|
||||
debug: true,
|
||||
debug: null,
|
||||
forceAlac: false,
|
||||
});
|
||||
// console.log('lol',txt)
|
||||
this.device.on("status", (status: any) => {
|
||||
|
@ -235,15 +236,15 @@ export default class RAOP {
|
|||
this._win.webContents.executeJavaScript(`app.sendAirPlayFailed()`);
|
||||
}
|
||||
if (status == "stopped") {
|
||||
this.airtunes.stopAll(() => {
|
||||
console.log("end");
|
||||
});
|
||||
this._win.webContents.executeJavaScript(`app.airplayDisconnect(true, ${[ipv4, ipport, sepassword, title, artist, album, artworkURL, txt, airplay2dv]})`).catch((err: any) => console.error(err));
|
||||
this.airtunes = null;
|
||||
this.device = null;
|
||||
this.ipairplay = "";
|
||||
this.portairplay = "";
|
||||
this.ok = 1;
|
||||
// this.airtunes.stopAll(() => {
|
||||
// console.log("end");
|
||||
// });
|
||||
// this._win.webContents.executeJavaScript(`app.airplayDisconnect(true, ${[ipv4, ipport, sepassword, title, artist, album, artworkURL, txt, airplay2dv]})`).catch((err: any) => console.error(err));
|
||||
// this.airtunes = null;
|
||||
// this.device = null;
|
||||
// this.ipairplay = "";
|
||||
// this.portairplay = "";
|
||||
// this.ok = 1;
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
if (this.ok == 1) {
|
||||
|
|
|
@ -2002,14 +2002,18 @@ const app = new Vue({
|
|||
}
|
||||
if (kind.toString().includes("apple-curator")) {
|
||||
kind = "appleCurator";
|
||||
app.getTypeFromID("appleCurator", id, false, {
|
||||
platform: "web",
|
||||
include: "grouping,playlists",
|
||||
extend: "editorialArtwork",
|
||||
"art[url]": "f",
|
||||
});
|
||||
window.location.hash = `${kind}/${id}`;
|
||||
document.querySelector("#app-content").scrollTop = 0;
|
||||
app
|
||||
.getTypeFromID("appleCurator", id, false, {
|
||||
platform: "web",
|
||||
include: "grouping,playlists",
|
||||
extend: "editorialArtwork",
|
||||
"art[url]": "f",
|
||||
})
|
||||
.then(() => {
|
||||
kind = "appleCurator";
|
||||
window.location.hash = `${kind}/${id}`;
|
||||
document.querySelector("#app-content").scrollTop = 0;
|
||||
});
|
||||
} else if (kind == "editorial-elements" || kind == "editorial-items") {
|
||||
console.debug(item);
|
||||
if (item.relationships?.contents?.data != null && item.relationships?.contents?.data.length > 0) {
|
||||
|
@ -4022,23 +4026,28 @@ const app = new Vue({
|
|||
}
|
||||
},
|
||||
getMediaItemArtwork(url, height = 64, width) {
|
||||
if (typeof url == "undefined" || url == "") {
|
||||
try {
|
||||
if (typeof url == "undefined" || url == "") {
|
||||
return "./assets/MissingArtwork.svg";
|
||||
}
|
||||
height = parseInt(height * window.devicePixelRatio);
|
||||
if (width) {
|
||||
width = parseInt(width * window.devicePixelRatio);
|
||||
}
|
||||
let newurl = `${(url ?? "")
|
||||
.replace("{w}", width ?? height)
|
||||
.replace("{h}", height)
|
||||
.replace("{f}", "webp")
|
||||
.replace("{c}", width === 900 || width === 380 || width === 600 ? "sr" : "cc")}`;
|
||||
|
||||
if (newurl.includes("900x516")) {
|
||||
newurl = newurl.replace("900x516cc", "900x516sr").replace("900x516bb", "900x516sr");
|
||||
}
|
||||
return newurl;
|
||||
} catch (e) {
|
||||
console.log(url);
|
||||
return "./assets/MissingArtwork.svg";
|
||||
}
|
||||
height = parseInt(height * window.devicePixelRatio);
|
||||
if (width) {
|
||||
width = parseInt(width * window.devicePixelRatio);
|
||||
}
|
||||
let newurl = `${url
|
||||
.replace("{w}", width ?? height)
|
||||
.replace("{h}", height)
|
||||
.replace("{f}", "webp")
|
||||
.replace("{c}", width === 900 || width === 380 || width === 600 ? "sr" : "cc")}`;
|
||||
|
||||
if (newurl.includes("900x516")) {
|
||||
newurl = newurl.replace("900x516cc", "900x516sr").replace("900x516bb", "900x516sr");
|
||||
}
|
||||
return newurl;
|
||||
},
|
||||
_rgbToRgb(rgb = [0, 0, 0]) {
|
||||
// if rgb
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
<div class="artwork">
|
||||
<mediaitem-artwork
|
||||
:url="item.attributes?.editorialArtwork.subscriptionHero.url ?? item.attributes?.artwork"
|
||||
:url="item.attributes?.editorialArtwork?.subscriptionHero?.url ?? item.attributes?.artwork?.url"
|
||||
:video="(item.attributes != null && item.attributes?.editorialVideo != null) ? (item.attributes?.editorialVideo?.motionDetailSquare ? item.attributes?.editorialVideo?.motionDetailSquare?.video : (item.attributes?.editorialVideo?.motionSquareVideo1x1 ? item?.attributes?.editorialVideo?.motionSquareVideo1x1?.video : '')) : '' "
|
||||
:size="516" :width="900"
|
||||
></mediaitem-artwork>
|
||||
|
|
|
@ -45,9 +45,9 @@
|
|||
<div class="title"
|
||||
:title="item.attributes?.name ?? (item.relationships?.contents?.data[0]?.attributes?.name ?? (item.attributes?.editorialNotes?.name ?? ''))"
|
||||
v-if="item.attributes.artistNames == null || kind != 'card'" @click='app.routeView(item)'>
|
||||
<div class="item-navigate text-overflow-elipsis">{{ item.attributes?.name.replace(/ /g, ' ').replace(/Apple Music |^Apple |/g, '') ??
|
||||
<div class="item-navigate text-overflow-elipsis">{{ (item.attributes?.editorialElementKind == "394" && item.relationships?.contents?.data[0]?.attributes?.shortName != null ) ? item.relationships?.contents?.data[0]?.attributes?.shortName : (item.attributes?.name ? ((removeamtext ) ? item.attributes?.name.replace(/ /g, ' ').replace(/Apple Music |^Apple |/g, '') : item.attributes?.name.replace(/ /g, ' ')) :
|
||||
(item.relationships?.contents?.data[0]?.attributes?.name ??
|
||||
(item.attributes?.editorialNotes?.name ?? '')) }}
|
||||
(item.attributes?.editorialNotes?.name ?? ''))) }}
|
||||
</div>
|
||||
<div class="explicit-icon" v-if="item.attributes && item.attributes.contentRating == 'explicit'"
|
||||
style="background-image: url(./assets/explicit.svg);height: 12px;width: 12px;filter: contrast(0);background-repeat: no-repeat;margin-top: 2.63px;margin-left: 4px;"></div>
|
||||
|
@ -98,6 +98,11 @@ Vue.component('mediaitem-square', {
|
|||
default: 'cc',
|
||||
required: false
|
||||
},
|
||||
removeamtext: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
'contextExt': { type: Object, required: false },
|
||||
},
|
||||
data: function () {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<script type="text/x-template" id="cider-applecurator">
|
||||
<div class="content-inner">
|
||||
<h1 class="header-text">{{ data.attributes.shortName ?? data.attributes.name}}</h1>
|
||||
<h1 class="header-text">{{ data.attributes?.shortName ?? data.attributes.name}}</h1>
|
||||
<template v-if="data.relationships && data.relationships.grouping">
|
||||
<template
|
||||
v-for="(recom,index) in data.relationships.grouping.data[0].relationships.tabs.data[0].relationships.children.data">
|
||||
|
@ -43,6 +43,9 @@
|
|||
return {
|
||||
app: this.$root
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log('ping')
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
|
|
@ -142,10 +142,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="categories">
|
||||
<mediaitem-square :kind="'385'" :imageformat="'bb'" size="600"
|
||||
<mediaitem-square :kind="'385'" :imageformat="'bb'" size="600" :removeamtext="true"
|
||||
:item="item ? (item.attributes.kind ? item : ((item.relationships && item.relationships.contents ) ? item.relationships.contents.data[0] : item)) : []"
|
||||
:imagesize="800"
|
||||
v-for="item of getFlattenedCategories()">
|
||||
v-for="item of getFlattenedCategories()"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
this.isVisible = isVisible
|
||||
},
|
||||
getMediaItemArtwork(url, height = 64, width) {
|
||||
try{
|
||||
if (typeof url == "undefined" || url == "") {
|
||||
return "./assets/MissingArtwork.svg"
|
||||
}
|
||||
|
@ -98,7 +99,9 @@
|
|||
if (newurl.includes("900x516")) {
|
||||
newurl = newurl.replace("900x516cc", "900x516sr").replace("900x516bb", "900x516sr");
|
||||
}
|
||||
return newurl
|
||||
return newurl} catch (e){
|
||||
return "./assets/MissingArtwork.svg"
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
|
|
@ -213,7 +213,7 @@
|
|||
}
|
||||
switch (this.kind) {
|
||||
case "385":
|
||||
artwork = this.item.attributes.editorialArtwork.subscriptionHero.url
|
||||
artwork = this.item.attributes?.editorialArtwork?.subscriptionHero?.url
|
||||
break;
|
||||
}
|
||||
if (!includeUrl) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue