Merge branch 'ciderapp:develop' into develop
This commit is contained in:
commit
a8ab4581ab
17 changed files with 202 additions and 156 deletions
|
@ -1,21 +1,18 @@
|
|||
version: 2.1
|
||||
|
||||
executors:
|
||||
cider-ci:
|
||||
docker:
|
||||
- image: circleci/node:16
|
||||
working_directory: ~/Cider
|
||||
|
||||
orbs: # adds orbs to your configuration
|
||||
jira: circleci/jira@1.0.5 # invokes the Jira orb, making its commands accessible
|
||||
|
||||
# The jobs for this project
|
||||
branches:
|
||||
only:
|
||||
- main
|
||||
- develop
|
||||
jobs:
|
||||
prepare-build:
|
||||
executor: cider-ci
|
||||
build:
|
||||
working_directory: ~/Cider
|
||||
docker:
|
||||
- image: circleci/node:16
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
- run: ls -la
|
||||
- run:
|
||||
name: Set App Version
|
||||
command: echo "export APP_VERSION=$(grep '"version":.*' package.json | cut -d '"' -f 4 | head -1)" >> $BASH_ENV
|
||||
|
@ -35,144 +32,50 @@ jobs:
|
|||
paths:
|
||||
- ~/.cache/yarn
|
||||
- run:
|
||||
name: TypeScript Compile
|
||||
command: yarn build
|
||||
- persist_to_workspace:
|
||||
# Must be an absolute path, or relative path from working_directory. This is a directory on the container which is
|
||||
# taken to be the root directory of the workspace.
|
||||
root: .
|
||||
# Must be relative path from root
|
||||
paths:
|
||||
- node_modules
|
||||
- build
|
||||
- resources
|
||||
- yarn.lock
|
||||
- package.json
|
||||
- winget.json # winget.json is a file that is generated by the winget package manager
|
||||
- LICENSE
|
||||
- license.txt
|
||||
|
||||
build-windows:
|
||||
executor: cider-ci
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/Cider
|
||||
- run:
|
||||
name: Install Windows System Build Dependencies
|
||||
name: Install system build dependencies
|
||||
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 install -y dpkg fakeroot wine64
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y wine32
|
||||
sudo apt install -y gh
|
||||
- run:
|
||||
name: Fix Versioning and Add Channel
|
||||
command: yarn circle:script
|
||||
- run:
|
||||
name: Generate Builds (Windows)
|
||||
command: yarn electron-builder -w --x64 -p never
|
||||
post-steps:
|
||||
- jira/notify
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- dist/*.exe
|
||||
- dist/latest.yml
|
||||
|
||||
build-linux:
|
||||
executor: cider-ci
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/Cider
|
||||
- run:
|
||||
name: Fix Versioning and Add Channel
|
||||
command: yarn circle:script
|
||||
name: TypeScript Compile
|
||||
command: yarn build
|
||||
- run:
|
||||
name: Generate Builds (Linux)
|
||||
command: yarn electron-builder -l -p never
|
||||
post-steps:
|
||||
- jira/notify
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- dist/*.deb
|
||||
- dist/*.AppImage
|
||||
- dist/*.snap
|
||||
- dist/latest-linux.yml
|
||||
|
||||
build-winget:
|
||||
executor: cider-ci
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: ~/Cider
|
||||
- run:
|
||||
name: Install Windows System Build Dependencies
|
||||
command: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y dpkg fakeroot wine64
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y wine32
|
||||
- run:
|
||||
name: Fix Versioning and Add Channel
|
||||
command: yarn circle:script
|
||||
name: Generate Builds (Windows)
|
||||
command: yarn electron-builder -w --x64 -p never
|
||||
post-steps:
|
||||
- jira/notify
|
||||
- run:
|
||||
name: Generate Builds (Winget)
|
||||
command: yarn electron-builder --win -c winget.json -p never
|
||||
post-steps:
|
||||
- jira/notify
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- dist/*.exe
|
||||
# - dist/*.yml
|
||||
|
||||
release:
|
||||
executor: cider-ci
|
||||
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
|
||||
- run:
|
||||
name: Move Build Files
|
||||
command: |
|
||||
mkdir ~/Cider/dist/artifacts/
|
||||
mv ~/Cider/dist/*.exe ~/Cider/dist/artifacts
|
||||
mv ~/Cider/dist/*.deb ~/Cider/dist/artifacts
|
||||
mv ~/Cider/dist/*.AppImage ~/Cider/dist/artifacts
|
||||
mv ~/Cider/dist/*.snap ~/Cider/dist/artifacts
|
||||
mv ~/Cider/dist/*.yml ~/Cider/dist/artifacts
|
||||
mv ~/Cider/dist/*.blockmap ~/Cider/dist/artifacts
|
||||
mkdir ~/Cider/dist/artifacts/
|
||||
mv ~/Cider/dist/*.exe ~/Cider/dist/artifacts
|
||||
mv ~/Cider/dist/*.deb ~/Cider/dist/artifacts
|
||||
mv ~/Cider/dist/*.AppImage ~/Cider/dist/artifacts
|
||||
mv ~/Cider/dist/*.snap ~/Cider/dist/artifacts
|
||||
mv ~/Cider/dist/*.yml ~/Cider/dist/artifacts
|
||||
mv ~/Cider/dist/*.blockmap ~/Cider/dist/artifacts
|
||||
- store_artifacts:
|
||||
path: ~/Cider/dist/artifacts
|
||||
path: ~/Cider/dist/artifacts
|
||||
- run:
|
||||
name: Publish Release
|
||||
command: |
|
||||
gh release create "v${APP_VERSION}.${CIRCLE_BUILD_NUM}" --title "Cider Version ${APP_VERSION} - Build ${CIRCLE_BUILD_NUM} (${CIRCLE_BRANCH})" --generate-notes -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
|
||||
|
||||
# Orchestrate our job run sequence
|
||||
workflows:
|
||||
build_and_release:
|
||||
jobs:
|
||||
- prepare-build
|
||||
- build-windows:
|
||||
requires:
|
||||
- prepare-build
|
||||
- build-linux:
|
||||
requires:
|
||||
- prepare-build
|
||||
- build-winget:
|
||||
requires:
|
||||
- prepare-build
|
||||
- release:
|
||||
requires:
|
||||
- build-windows
|
||||
- build-linux
|
||||
- build-winget
|
||||
gh release create "v${APP_VERSION}.${CIRCLE_BUILD_NUM}" --title "Cider Version ${APP_VERSION} - Build ${CIRCLE_BUILD_NUM} (${CIRCLE_BRANCH})" --generate-notes -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
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
"@sentry/electron": "^3.0.7",
|
||||
"@sentry/integrations": "^6.19.6",
|
||||
"adm-zip": "0.4.10",
|
||||
"airtunes2": "git+https://github.com/vapormusic/node_airtunes2.git",
|
||||
"airtunes2": "git+https://github.com/vapormusic/node_airtunes2.git#hap",
|
||||
"castv2-client": "^1.2.0",
|
||||
"chokidar": "^3.5.3",
|
||||
"discord-rpc": "^4.0.1",
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"term.login": "登录",
|
||||
"term.about": "关于",
|
||||
"term.privateSession": "私人聆听",
|
||||
"term.lyrics": "歌词",
|
||||
"term.queue": "待播清单",
|
||||
"term.history": "历史记录",
|
||||
"term.miniplayer": "迷你播放器",
|
||||
|
@ -115,7 +116,11 @@
|
|||
"term.contributors": "贡献者",
|
||||
"term.equalizer": "均衡器",
|
||||
"term.reset": "重置",
|
||||
"term.tracks": "首歌曲",
|
||||
"term.track": {
|
||||
"one": "首歌曲",
|
||||
"other": "首歌曲"
|
||||
},
|
||||
"term.tracks": "歌曲",
|
||||
"term.videos": "音乐视频",
|
||||
"term.menu": "菜单",
|
||||
"term.check": "检查",
|
||||
|
@ -161,6 +166,9 @@
|
|||
"podcast.episodes": "单集",
|
||||
"podcast.playEpisode": "播放单集",
|
||||
"podcast.website": "Podcast 网站",
|
||||
"action.edit": "编辑",
|
||||
"action.done": "完成",
|
||||
"action.editTracklist": "编辑歌曲清单",
|
||||
"action.addToLibrary": "加入资料库",
|
||||
"action.addToLibrary.success": "成功加入资料库",
|
||||
"action.addToLibrary.error": "加入资料库的过程发生了错误",
|
||||
|
@ -187,6 +195,7 @@
|
|||
"action.startRadio": "开始电台",
|
||||
"action.goToArtist": "前往艺人",
|
||||
"action.goToAlbum": "前往专辑",
|
||||
"action.showInAppleMusic": "显示于 Apple Music",
|
||||
"action.moveToTop": "移到顶部",
|
||||
"action.share": "分享歌曲",
|
||||
"action.rename": "重命名",
|
||||
|
@ -203,11 +212,19 @@
|
|||
"action.showAlbum": "显示专辑",
|
||||
"action.tray.minimize": "最小化",
|
||||
"action.tray.quit": "退出",
|
||||
|
||||
"action.update": "更新",
|
||||
"action.copy": "复制",
|
||||
"action.newpreset": "新建默认...",
|
||||
"action.deletepreset": "删除默认",
|
||||
"action.open": "打开",
|
||||
"action.cast.chromecast": "Chromecast",
|
||||
"action.cast.todevices": "投射到设备",
|
||||
"action.cast.stop": "停止投射到所有设备",
|
||||
"action.cast.airplay": "AirPlay",
|
||||
"action.cast.airplay.underdevelopment": "AirPlay 仍处于开发阶段中,敬请期待。",
|
||||
"action.cast.scan": "搜索",
|
||||
"action.cast.scanning": "搜索中...",
|
||||
"action.createNew": "添加...",
|
||||
"settings.header.general": "通用",
|
||||
"settings.header.general.description": "调整 Cider 的通用设置",
|
||||
"settings.option.audio.volumeStep": "音量改变量",
|
||||
|
@ -218,6 +235,10 @@
|
|||
"settings.option.general.resumebehavior.locally.description": "Cider 将还原你在这台电脑上的最后一次操作。",
|
||||
"settings.option.general.resumebehavior.history": "历史",
|
||||
"settings.option.general.resumebehavior.history.description": "Cider 将跨设备将你的整个 Apple Music 历史记录中的最后一首歌曲排队入列。",
|
||||
"settings.option.general.resumetabs": "启动时打开的选项页面",
|
||||
"settings.option.general.resumetabs.description": "你可以选择启动 Cider 时要默认打开的页面。",
|
||||
"settings.option.general.resumetabs.dynamic": "动态",
|
||||
"settings.option.general.resumetabs.dynamic.description": "Cider 将自动打开你上次停留的页面。",
|
||||
"settings.option.general.language": "语言",
|
||||
"settings.option.general.language.main": "语言",
|
||||
"settings.option.general.language.fun": "恶搞语言",
|
||||
|
@ -229,6 +250,8 @@
|
|||
"settings.option.general.updateCider.branch.develop": "测试(Develop)",
|
||||
"settings.option.general.customizeSidebar": "自定义侧边栏的功能",
|
||||
"settings.option.general.customizeSidebar.customize": "自定义",
|
||||
"settings.option.general.keybindings": "快捷操作键",
|
||||
"settings.option.general.keybindings.open": "打开",
|
||||
"settings.notyf.updateCider.update-not-available": "没有可用的更新",
|
||||
"settings.notyf.updateCider.update-downloaded": "更新已成功下载,重启后进行更新",
|
||||
"settings.notyf.updateCider.update-error": "更新时,发生错误",
|
||||
|
@ -250,20 +273,27 @@
|
|||
"settings.option.audio.audioLab": "Cider 音频实验室",
|
||||
"settings.option.audio.audioLab.description": "包含由 Cider 开发团队进行的各种音频优化功能。",
|
||||
"settings.warn.audioLab.withoutAF": "使用 Cider 音频实验室需要打开进阶音频功能才可使用。" ,
|
||||
"settings.option.audio.enableAdvancedFunctionality.analogWarmth": "模拟温暖",
|
||||
"settings.option.audio.enableAdvancedFunctionality.analogWarmth": "模拟温暖",
|
||||
"settings.option.audio.enableAdvancedFunctionality.analogWarmth.description": "以 Korg Nutube 6P1 为蓝本的模拟温暖。",
|
||||
"settings.option.audio.enableAdvancedFunctionality.analogWarmthIntensity": "模拟温暖强度",
|
||||
"settings.option.audio.enableAdvancedFunctionality.analogWarmthIntensity.description": "改变模拟温暖模组处理的强度。",
|
||||
"settings.option.audio.enableAdvancedFunctionality.analogWarmthIntensity.smooth": "温和",
|
||||
"settings.option.audio.enableAdvancedFunctionality.analogWarmthIntensity.warm": "温暖",
|
||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPE": "Cider 数码增强音频处理™️",
|
||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizer": "Cider 音乐气氛实现器™️",
|
||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizer.description": "以最先进的音频置为蓝本,实现不同的音乐气氛。",
|
||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode": "Cider 音乐气氛™️模式",
|
||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.description": "更改气氛实现器模块的操作模式。",
|
||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.natural1": "自然(标准)",
|
||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.natural2": "自然(高)",
|
||||
"settings.option.audio.enableAdvancedFunctionality.atmosphereRealizerMode.natural3": "自然(增强)",
|
||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPE": "Cider 数码增强音频处理™️",
|
||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPE.description": "通过人类的听力心理学模型和 AAC 编码特色的即时算法,强化 256 kbps AAC 音频的感知音频质量。",
|
||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength": "数码增强音频处理设置",
|
||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.description": "将更改音频处理的激进/振奋程度(增强选项有可能会引起杂讯)。",
|
||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.standard": "标准",
|
||||
"settings.option.audio.enableAdvancedFunctionality.ciderPPEStrength.aggressive": "增强",
|
||||
"settings.option.audio.enableAdvancedFunctionality.audioNormalization": "音量平衡",
|
||||
"settings.option.audio.enableAdvancedFunctionality.audioNormalization.description": "自动将歌曲播放音量调整到相同水平,享受更舒适的聆听体验。",
|
||||
"settings.option.audio.enableAdvancedFunctionality.audioNormalization.description": "自动将歌曲播放音量调整到相同水平,享受更舒适的聆听体验。",
|
||||
"settings.option.audio.enableAdvancedFunctionality.audioNormalization.disabled": "此功能由音频实验室管理",
|
||||
"settings.option.audio.enableAdvancedFunctionality.audioSpatialization": "空间音频",
|
||||
"settings.option.audio.enableAdvancedFunctionality.audioSpatialization.description": "将音频进行空间化处理来制造一个更立体的聆听体验(注:此功能不是官方的杜比全景声)。",
|
||||
|
@ -274,6 +304,7 @@
|
|||
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.standard": "标准",
|
||||
"settings.option.audio.enableAdvancedFunctionality.tunedAudioSpatialization.profile.audiophile": "发烧友",
|
||||
"settings.warn.audio.enableAdvancedFunctionality.audioSpatialization.compatibility": "音频空间无法与 CAP 相容,请关闭 CAP 在进行操作。",
|
||||
"settings.option.visual.uiscale": "UI界面大小",
|
||||
"settings.header.visual": "外观",
|
||||
"settings.header.visual.description": "调整 Cider 的外观",
|
||||
"settings.option.visual.windowBackgroundStyle": "窗口背景样式",
|
||||
|
@ -327,14 +358,16 @@
|
|||
"settings.option.lyrics.enableMusixmatchKaraoke": "启用卡拉 OK 模式(仅 Musixmatch)",
|
||||
"settings.option.lyrics.musixmatchPreferredLanguage": "Musixmatch 歌词语言偏好",
|
||||
"settings.option.lyrics.enableYoutubeLyrics": "播放 MV 时使用 YouTube 歌词",
|
||||
"settings.option.lyrics.enableQQLyrics": "启用 QQ 音乐的歌词",
|
||||
"settings.header.connectivity": "外部连接",
|
||||
"settings.header.connectivity.description": "调整 Cider 与外部应用的交互设置",
|
||||
"settings.option.connectivity.discordRPC": "Discord 动态",
|
||||
"settings.option.connectivity.playbackNotifications": "歌曲播放通知",
|
||||
"settings.header.connectivity.discordRPC.cider": "显示正在使用 'Cider'",
|
||||
"settings.header.connectivity.discordRPC.appleMusic": "显示正在使用 'Apple Music'",
|
||||
"settings.option.connectivity.discordRPC.clientName": "应用程序名称",
|
||||
"settings.option.connectivity.discordRPC.clearOnPause": "暂停时清除 Discord 动态",
|
||||
"settings.option.connectivity.discordRPC.hideButtons": "隐藏 Discord 动态上的按钮",
|
||||
"settings.option.connectivity.discordRPC.detailsFormat": "详细信息格式",
|
||||
"settings.option.connectivity.discordRPC.stateFormat": "动态格式",
|
||||
"settings.option.connectivity.lastfmScrobble": "LastFM Scrobbling 记录",
|
||||
"settings.option.connectivity.lastfmScrobble.delay": "LastFM Scrobble 延迟 (%)",
|
||||
"settings.option.connectivity.lastfmScrobble.nowPlaying": "打开 LastFM 正在播放",
|
||||
|
|
|
@ -151,6 +151,9 @@
|
|||
"podcast.episodes": "單集",
|
||||
"podcast.playEpisode": "播放單集",
|
||||
"podcast.website": "Podcast 網站",
|
||||
"action.edit": "編輯",
|
||||
"action.done": "完成",
|
||||
"action.editTracklist": "編輯歌曲清單",
|
||||
"action.addToLibrary": "加入到資料庫",
|
||||
"action.addToLibrary.success": "成功加入資料庫",
|
||||
"action.addToLibrary.error": "加入資料庫時,發生錯誤",
|
||||
|
@ -215,10 +218,10 @@
|
|||
"settings.option.general.resumebehavior.locally.description": "Cider 將還原你在這台電腦上的最後一次操作。",
|
||||
"settings.option.general.resumebehavior.history": "歷史",
|
||||
"settings.option.general.resumebehavior.history.description": "Cider 將跨裝置將你的整個 Apple Music 歷史記錄中的最後一首歌曲排隊入列。",
|
||||
"settings.option.general.resumetabs": "啟動時打開的選項",
|
||||
"settings.option.general.resumetabs.description": "你可以選擇啟動 Cider 時要預設打開的左側選項欄。",
|
||||
"settings.option.general.resumetabs.dynamic": "動態",
|
||||
"settings.option.general.resumetabs.dynamic.description": "Cider 將打開你上次停留的左側選項欄。",
|
||||
"settings.option.general.resumetabs": "啟動時打開的選項頁面",
|
||||
"settings.option.general.resumetabs.description": "你可以選擇啟動 Cider 時要預設打開的頁面。",
|
||||
"settings.option.general.resumetabs.dynamic": "自動",
|
||||
"settings.option.general.resumetabs.dynamic.description": "Cider 將自動打開你上次停留的頁面。",
|
||||
"settings.option.general.language.main": "語言",
|
||||
"settings.option.general.language.fun": "特殊語言",
|
||||
"settings.option.general.language.unsorted": "未分類",
|
||||
|
|
|
@ -95,6 +95,7 @@ export class BrowserWindow {
|
|||
"components/fullscreen",
|
||||
"components/miniplayer",
|
||||
"components/castmenu",
|
||||
"components/airplay-modal",
|
||||
"components/artist-chip",
|
||||
"components/hello-world",
|
||||
"components/inline-collection-list",
|
||||
|
@ -897,6 +898,10 @@ export class BrowserWindow {
|
|||
event.returnValue = process.platform;
|
||||
});
|
||||
|
||||
ipcMain.on("get-port", (event) => {
|
||||
event.returnValue = this.clientPort;
|
||||
});
|
||||
|
||||
ipcMain.on("is-dev", (event) => {
|
||||
event.returnValue = this.devMode;
|
||||
});
|
||||
|
|
|
@ -28,7 +28,7 @@ export default class ChromecastPlugin {
|
|||
// private GCstream = new Stream.PassThrough(),
|
||||
private connectedHosts: any = {};
|
||||
private connectedPlayer: any;
|
||||
// private port = false;
|
||||
private ciderPort :any = 9000;
|
||||
// private server = false;
|
||||
// private bufcount = 0;
|
||||
// private bufcount2 = 0;
|
||||
|
@ -148,7 +148,7 @@ export default class ChromecastPlugin {
|
|||
}
|
||||
let media = {
|
||||
// Here you can plug an URL to any mp4, webm, mp3 or jpg file with the proper contentType.
|
||||
contentId: 'http://' + this.getIp() + ':9000/audio.wav',
|
||||
contentId: 'http://' + this.getIp() + ':'+ this.ciderPort +'/audio.wav',
|
||||
contentType: 'audio/wav',
|
||||
streamType: 'LIVE', // or LIVE
|
||||
|
||||
|
@ -361,4 +361,12 @@ export default class ChromecastPlugin {
|
|||
|
||||
}
|
||||
|
||||
onRendererReady(): void {
|
||||
this._win.webContents.executeJavaScript(
|
||||
`ipcRenderer.sendSync('get-port')`
|
||||
).then((result: any) => {
|
||||
this.ciderPort = result;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
|
@ -89,9 +89,9 @@ export default class RAOP {
|
|||
`;
|
||||
|
||||
private ondeviceup(name: any, host: any, port: any, addresses: any, text: any) {
|
||||
if (this.castDevices.findIndex((item: any) => item.name === host && item.port === port && item.addresses === addresses) === -1) {
|
||||
if (this.castDevices.findIndex((item: any) => item.name == host.replace(".local","") && item.port == port && item.addresses == addresses) === -1) {
|
||||
this.castDevices.push({
|
||||
name: host,
|
||||
name: host.replace(".local",""),
|
||||
host: addresses ? addresses[0] : '',
|
||||
port: port,
|
||||
addresses: addresses,
|
||||
|
@ -147,14 +147,28 @@ export default class RAOP {
|
|||
browser.on('ready', browser.discover);
|
||||
|
||||
browser.on('update', (service: any) => {
|
||||
if (service.addresses && service.fullname && (service.fullname.includes('_raop._tcp') || service.fullname.includes('_airplay._tcp'))) {
|
||||
if (service.addresses && service.fullname && (service.fullname.includes('_raop._tcp') || service.fullname.includes('_airplay._tcp'))) {
|
||||
// console.log(service.txt)
|
||||
this._win.webContents.executeJavaScript(`console.log(
|
||||
"${service.name} ${service.host}:${service.port} ${service.addresses}"
|
||||
)`);
|
||||
this.ondeviceup(service.name, service.host, service.port, service.addresses, service.txt);}
|
||||
this.ondeviceup(service.name, service.host, service.port, service.addresses, service.txt);
|
||||
}
|
||||
});
|
||||
|
||||
// const browser2 = this.mdns.createBrowser(this.mdns.tcp('airplay'));
|
||||
// browser2.on('ready', browser2.discover);
|
||||
|
||||
// browser2.on('update', (service: any) => {
|
||||
// if (service.addresses && service.fullname && (service.fullname.includes('_raop._tcp') || service.fullname.includes('_airplay._tcp'))) {
|
||||
// // console.log(service.txt)
|
||||
// this._win.webContents.executeJavaScript(`console.log(
|
||||
// "${service.name} ${service.host}:${service.port} ${service.addresses}"
|
||||
// )`);
|
||||
// this.ondeviceup(service.name, service.host, service.port, service.addresses, service.txt);
|
||||
// }
|
||||
// });
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
@ -178,6 +192,15 @@ export default class RAOP {
|
|||
this._win.webContents.setAudioMuted(true);
|
||||
this._win.webContents.executeJavaScript(`CiderAudio.sendAudio()`).catch((err: any) => console.error(err));
|
||||
}
|
||||
if (status == "need_password"){
|
||||
this._win.webContents.executeJavaScript(`app.setAirPlayCodeUI()`)
|
||||
}
|
||||
if (status == "pair_success"){
|
||||
this._win.webContents.executeJavaScript(`app.sendAirPlaySuccess()`)
|
||||
}
|
||||
if (status == "pair_failed"){
|
||||
this._win.webContents.executeJavaScript(`app.sendAirPlayFailed()`)
|
||||
}
|
||||
if (status == 'stopped') {
|
||||
this.airtunes.stopAll(() => {
|
||||
console.log('end');
|
||||
|
@ -210,6 +233,12 @@ export default class RAOP {
|
|||
|
||||
});
|
||||
|
||||
electron.ipcMain.on('setAirPlayPasscode', (event, passcode) => {
|
||||
if (this.device){
|
||||
this.device.setPasscode(passcode)
|
||||
}
|
||||
})
|
||||
|
||||
electron.ipcMain.on('writeWAV', (event, leftbuffer, rightbuffer) => {
|
||||
if (this.airtunes != null) {
|
||||
if (this.worker == null) {
|
||||
|
|
|
@ -372,8 +372,7 @@
|
|||
background-repeat: no-repeat;
|
||||
}
|
||||
.heart-icon {
|
||||
height: 18px;
|
||||
width: 39px;
|
||||
position: absolute;
|
||||
filter: contrast(0);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
|
|
@ -457,8 +457,8 @@
|
|||
}
|
||||
|
||||
.heart-icon {
|
||||
height: 18px;
|
||||
width: 39px;
|
||||
position: absolute;
|
||||
right:0;
|
||||
filter: contrast(0);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
|
|
@ -70,10 +70,11 @@
|
|||
|
||||
.spatialproperties-panel {
|
||||
.modal-window {
|
||||
&:not(.airplay-modal){
|
||||
height : 700px;
|
||||
max-height: 700px;
|
||||
width : 800px;
|
||||
max-width : 800px;
|
||||
max-width : 800px;}
|
||||
overflow : hidden;
|
||||
|
||||
.info-header {
|
||||
|
|
|
@ -207,6 +207,7 @@ const app = new Vue({
|
|||
showPlaylist: false,
|
||||
castMenu: false,
|
||||
moreInfo: false,
|
||||
airplayPW: false,
|
||||
},
|
||||
socialBadges: {
|
||||
badgeMap: {},
|
||||
|
@ -3830,6 +3831,15 @@ const app = new Vue({
|
|||
|
||||
// tracks are found in relationship.data
|
||||
},
|
||||
setAirPlayCodeUI() {
|
||||
this.modals.airplayPW = true
|
||||
},
|
||||
sendAirPlaySuccess(){
|
||||
notyf.success('Device paired successfully!');
|
||||
},
|
||||
sendAirPlayFailed(){
|
||||
notyf.error('Device paring failed!');
|
||||
},
|
||||
windowFocus(val) {
|
||||
if (val) {
|
||||
document.querySelectorAll(".animated-artwork-video").forEach(el => {
|
||||
|
@ -4009,7 +4019,8 @@ const app = new Vue({
|
|||
}
|
||||
}
|
||||
|
||||
if (app.mk.nowPlayingItem._container["attributes"] && app.mk.nowPlayingItem._container.name != "station") {
|
||||
const nowPlayingContainer = app.mk.nowPlayingItem._container;
|
||||
if (nowPlayingContainer && nowPlayingContainer["attributes"] && nowPlayingContainer.name != "station") {
|
||||
menus.normal.items.find(x => x.id == "showInMusic").hidden = false
|
||||
}
|
||||
|
||||
|
|
|
@ -7936,9 +7936,12 @@ fieldset:disabled .btn {
|
|||
filter: contrast(0);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.cd-mediaitem-list-item .playIcon{
|
||||
width: 44px;
|
||||
margin-left: 11px;
|
||||
}
|
||||
.cd-mediaitem-list-item .heart-icon {
|
||||
height: 18px;
|
||||
width: 39px;
|
||||
position: absolute;
|
||||
filter: contrast(0);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
<transition name="modal">
|
||||
<castmenu v-if="modals.castMenu"></castmenu>
|
||||
</transition>
|
||||
<transition name="modal">
|
||||
<airplay-modal v-if="modals.airplayPW"></airplay-modal>
|
||||
</transition>
|
||||
<transition name="modal">
|
||||
<plugin-menu v-if="modals.pluginMenu"></plugin-menu>
|
||||
</transition>
|
||||
|
|
42
src/renderer/views/components/airplay-modal.ejs
Normal file
42
src/renderer/views/components/airplay-modal.ejs
Normal file
|
@ -0,0 +1,42 @@
|
|||
<script type="text/x-template" id="airplay-modal">
|
||||
<div class="spatialproperties-panel castmenu modal-fullscreen airplay-modal" @click.self="close()" @contextmenu.self="close()">
|
||||
<div class="modal-window airplay-modal">
|
||||
<div class="modal-header">
|
||||
<div class="modal-title">{{'Enter password'}}</div>
|
||||
<button class="close-btn" @click="close()"></button>
|
||||
</div>
|
||||
<div class="modal-content" style="overflow-y: overlay; padding: 3%">
|
||||
<input type="text" v-model="passcode"/>
|
||||
</div>
|
||||
<div class="md-footer">
|
||||
<div class="row">
|
||||
<div class="col" >
|
||||
<button style="width:100%" @click="enterPassword()" class="md-btn md-btn-block md-btn-primary">{{'OK'}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
<script>
|
||||
Vue.component('airplay-modal', {
|
||||
template: '#airplay-modal',
|
||||
data: function () {
|
||||
return {
|
||||
passcode: '',
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$root.modals.airplayPW = false
|
||||
},
|
||||
enterPassword() {
|
||||
console.log('Entered passCode: ', this.passcode)
|
||||
ipcRenderer.send("setAirPlayPasscode",this.passcode)
|
||||
this.close()
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -37,7 +37,7 @@
|
|||
<div class="md-option-container" style="margin-top: 12px;margin-bottom: 12px;">
|
||||
<div class="md-option-line">
|
||||
<div class="md-option-segment">
|
||||
{{true ? 'Homepods only for now! (NO PASSWORD PLEASE!)' : 'Please add FFmpeg location in Settings -> Advanced'}}
|
||||
{{'EXPERIMENTAL!!! Supports Homepods / Apple TVs / Shairport for now, AirPlay on Samsung/LG/Sony devices will be added later'}}
|
||||
<!-- {{$root.getLz('action.cast.airplay.underdevelopment')}} -->
|
||||
<template v-if="true" v-for="(device) in devices.airplay">
|
||||
<div class="md-option-line" style="cursor: pointer" @click="setAirPlayCast(device)">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<button @click="addToLibrary()" v-if="!addedToLibrary && (showIndex == false ||(showIndex == true && showIndexPlaylist != false))">
|
||||
<div class="svg-icon addIcon" :style="{'--color': 'var(--keyColor)', '--url': 'url(./assets/feather/plus.svg)'}"></div>
|
||||
</button>
|
||||
<button v-else-if='!(showArtwork == true && (showIndex == false ||(showIndex == true && showIndexPlaylist != false)))' @click="playTrack()" style="width: 44px;margin-left: -5px;">
|
||||
<button v-else-if='!(showArtwork == true && (showIndex == false ||(showIndex == true && showIndexPlaylist != false)))' @click="playTrack()">
|
||||
<div class="svg-icon playIcon" :style="{'--color': 'var(--keyColor)', '--url': 'url(./assets/feather/play.svg)'}"></div>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -13,12 +13,11 @@
|
|||
</div>
|
||||
<div class="queue-body" v-if="page == 'queue'">
|
||||
<draggable v-model="queueItems" @start="drag=true" @end="drag=false;move()">
|
||||
<template v-for="(queueItem, position) in queueItems">
|
||||
<div v-if="position <= queuePosition" style="display: none;">{{ position }}</div>
|
||||
<template v-for="(queueItem, position) in displayQueueItems">
|
||||
<div class="cd-queue-item"
|
||||
:class="{selected: selectedItems.includes(position)}"
|
||||
@click="select($event, position)"
|
||||
@dblclick="playQueueItem(position)" v-else :key="position"
|
||||
@dblclick="playQueueItem(position)" :key="position"
|
||||
@contextmenu="selected = position;queueContext($event, queueItem.item, position)">
|
||||
<div class="row">
|
||||
<div class="col-auto flex-center">
|
||||
|
@ -61,6 +60,13 @@
|
|||
app: this.$root
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
displayQueueItems() {
|
||||
const displayLimit = 50;
|
||||
const lastDisplayPosition = Math.min(displayLimit + this.queuePosition, this.queueItems.length);
|
||||
return this.queueItems.slice(this.queuePosition, lastDisplayPosition);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.updateQueue()
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue