Merge branch 'ciderapp:develop' into develop
This commit is contained in:
commit
54eb414285
31 changed files with 258 additions and 104 deletions
|
@ -1,18 +1,21 @@
|
|||
version: 2.1
|
||||
orbs: # adds orbs to your configuration
|
||||
jira: circleci/jira@1.0.5 # invokes the Jira orb, making its commands accessible
|
||||
branches:
|
||||
only:
|
||||
- main
|
||||
- develop
|
||||
jobs:
|
||||
build:
|
||||
working_directory: ~/Cider
|
||||
|
||||
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
|
||||
jobs:
|
||||
prepare-build:
|
||||
executor: cider-ci
|
||||
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
|
||||
|
@ -32,50 +35,144 @@ jobs:
|
|||
paths:
|
||||
- ~/.cache/yarn
|
||||
- run:
|
||||
name: Install system build dependencies
|
||||
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
|
||||
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: TypeScript Compile
|
||||
command: yarn build
|
||||
- run:
|
||||
name: Generate Builds (Linux)
|
||||
command: yarn electron-builder -l -p never
|
||||
post-steps:
|
||||
- jira/notify
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
- 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
|
||||
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
|
||||
|
|
|
@ -73,7 +73,6 @@
|
|||
"term.viewAs": "Megjelenítés",
|
||||
"term.viewAs.coverArt": "Borító",
|
||||
"term.viewAs.list": "Lista",
|
||||
"term.dynamic": "Dinamikus",
|
||||
"term.size": "Méret",
|
||||
"term.size.normal": "Normál",
|
||||
"term.size.compact": "Kompakt",
|
||||
|
@ -407,6 +406,7 @@
|
|||
"settings.option.lyrics.enableMusixmatchKaraoke": "Karaoke mód bekapcsolása (Csak MusixMatch)",
|
||||
"settings.option.lyrics.musixmatchPreferredLanguage": "MusixMatch fordítás nyelve",
|
||||
"settings.option.lyrics.enableYoutubeLyrics": "YouTube dalszövegek engedélyezése a zenei videóknál",
|
||||
"settings.option.lyrics.enableQQLyrics": "QQLyrics dalszövegek engedélyezése",
|
||||
"settings.header.connectivity": "Csatlakozások",
|
||||
"settings.header.connectivity.description": "A Cider csatlakozás beállításainak módosítása.",
|
||||
"settings.option.connectivity.playbackNotifications": "Lejátszási értesítések",
|
||||
|
|
|
@ -215,6 +215,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.main": "語言",
|
||||
"settings.option.general.language.fun": "特殊語言",
|
||||
"settings.option.general.language.unsorted": "未分類",
|
||||
|
@ -345,8 +349,8 @@
|
|||
"settings.option.connectivity.discordRPC.hideButtons": "隱藏 Discord 動態上的按鈕",
|
||||
"settings.option.connectivity.discordRPC.detailsFormat": "詳細資訊格式",
|
||||
"settings.option.connectivity.discordRPC.stateFormat": "狀態格式",
|
||||
"settings.option.connectivity.lastfmScrobble": "Last.FM Scrobbling 記錄",
|
||||
"settings.option.connectivity.lastfmScrobble.delay": "Last.FM Scrobble 延遲 (%)",
|
||||
"settings.option.connectivity.lastfmScrobble": "Last.FM 音樂記錄",
|
||||
"settings.option.connectivity.lastfmScrobble.delay": "Last.FM 歌曲追蹤延遲 (%)",
|
||||
"settings.option.connectivity.lastfmScrobble.nowPlaying": "開啟 Last.FM 正在聆聽",
|
||||
"settings.option.connectivity.lastfmScrobble.removeFeatured": "從歌名中移除客串藝人 (Last.FM)",
|
||||
"settings.option.connectivity.lastfmScrobble.filterLoop": "不記錄單曲循環 (Last.FM)",
|
||||
|
|
|
@ -26,9 +26,9 @@ export class Plugins {
|
|||
}
|
||||
|
||||
public static getPluginFromMap(plugin: string): any {
|
||||
if(Plugins.PluginMap[plugin]) {
|
||||
if (Plugins.PluginMap[plugin]) {
|
||||
return Plugins.PluginMap[plugin];
|
||||
}else{
|
||||
} else {
|
||||
return plugin;
|
||||
}
|
||||
}
|
||||
|
|
1
src/renderer/assets/feather/heart-fill.svg
Normal file
1
src/renderer/assets/feather/heart-fill.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>
|
After Width: | Height: | Size: 379 B |
|
@ -105,7 +105,7 @@ function fallbackinitMusicKit() {
|
|||
})
|
||||
setTimeout(() => {
|
||||
app.init()
|
||||
if(app.cfg.visual.window_background_style == "mica" && !app.isDev) {
|
||||
if (app.cfg.visual.window_background_style == "mica" && !app.isDev) {
|
||||
app.spawnMica()
|
||||
}
|
||||
}, 1000)
|
||||
|
@ -134,7 +134,7 @@ document.addEventListener('musickitloaded', function () {
|
|||
function waitForApp() {
|
||||
if (typeof app.init !== "undefined") {
|
||||
app.init()
|
||||
if(app.cfg.visual.window_background_style == "mica" && !app.isDev) {
|
||||
if (app.cfg.visual.window_background_style == "mica" && !app.isDev) {
|
||||
app.spawnMica()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -371,6 +371,12 @@
|
|||
filter: contrast(0);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.heart-icon {
|
||||
height: 18px;
|
||||
width: 39px;
|
||||
filter: contrast(0);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
@keyframes load-bar {
|
||||
10% {
|
||||
box-shadow: inset 0 -4px 0;
|
||||
|
|
|
@ -456,6 +456,13 @@
|
|||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.heart-icon {
|
||||
height: 18px;
|
||||
width: 39px;
|
||||
filter: contrast(0);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/* CSS.gg
|
||||
*/
|
||||
@keyframes load-bar {
|
||||
|
|
|
@ -22,7 +22,7 @@ const Events = {
|
|||
if (event.keyCode === 82 && event.ctrlKey) {
|
||||
event.preventDefault()
|
||||
bootbox.confirm("Reload Cider?", (res)=>{
|
||||
if(res) {
|
||||
if (res) {
|
||||
window.location.reload()
|
||||
}
|
||||
})
|
||||
|
|
|
@ -251,9 +251,9 @@ function simulateGamepad () {
|
|||
|
||||
cursorPos[1] -= cursorSpeed
|
||||
// sounds.Hover.play()
|
||||
// if(intTabIndex <= 0) {
|
||||
// if (intTabIndex <= 0) {
|
||||
// intTabIndex = 0
|
||||
// }else{
|
||||
// } else {
|
||||
// intTabIndex--
|
||||
// }
|
||||
// $(tabbable[intTabIndex]).focus()
|
||||
|
@ -263,9 +263,9 @@ function simulateGamepad () {
|
|||
e.preventDefault()
|
||||
|
||||
cursorPos[1] += cursorSpeed
|
||||
// if(intTabIndex < tabbable.length) {
|
||||
// if (intTabIndex < tabbable.length) {
|
||||
// intTabIndex++
|
||||
// }else{
|
||||
// } else {
|
||||
// intTabIndex = tabbable.length
|
||||
// }
|
||||
// $(tabbable[intTabIndex]).focus()
|
||||
|
|
|
@ -1579,7 +1579,7 @@ const app = new Vue({
|
|||
}
|
||||
route = route.replace(/#/g, "")
|
||||
if (app.cfg.general.resumeTabs.tab == "dynamic") {
|
||||
if (route == "home" || route == "library-songs" || route == "library-albums" || route == "library-artists" || route == "library-videos" || route == "podcasts") {
|
||||
if (route == "home" || route == "listen_now" || route == "browse" || route == "radio" || route == "library-songs" || route == "library-albums" || route == "library-artists" || route == "library-videos" || route == "podcasts") {
|
||||
app.cfg.general.resumeTabs.dynamicData = route
|
||||
} else {
|
||||
app.cfg.general.resumeTabs.dynamicData = "home"
|
||||
|
@ -1671,11 +1671,11 @@ const app = new Vue({
|
|||
params["meta[albums:tracks]"] = 'popularity'
|
||||
params["fields[albums]"] = "artistName,artistUrl,artwork,contentRating,editorialArtwork,editorialNotes,editorialVideo,name,playParams,releaseDate,url,copyright"
|
||||
}
|
||||
if(kind.includes("playlist") || kind.includes("album")){
|
||||
if (kind.includes("playlist") || kind.includes("album")){
|
||||
app.page = (kind) + "_" + (id);
|
||||
window.location.hash = `${kind}/${id}${isLibrary ? "/" + isLibrary : ''}`
|
||||
app.getTypeFromID((kind), (id), (isLibrary), params);
|
||||
}else{
|
||||
} else {
|
||||
app.page = (kind)
|
||||
window.location.hash = `${kind}/${id}${isLibrary ? "/" + isLibrary : ''}`
|
||||
}
|
||||
|
@ -2817,7 +2817,7 @@ const app = new Vue({
|
|||
});
|
||||
app.lyrics = preLrc;
|
||||
}
|
||||
if (lrcfile != null && lrcfile != '' && lang != "disabled") {
|
||||
if (lrcfile != null && lrcfile != '') {
|
||||
// load translation
|
||||
getMXMTrans(id, lang, token);
|
||||
} else {
|
||||
|
|
|
@ -108,11 +108,11 @@ const wsapi = {
|
|||
app.mk.isPlaying ? app.mk.pause() : app.mk.play()
|
||||
},
|
||||
toggleRepeat() {
|
||||
if(MusicKit.getInstance().repeatMode == 0) {
|
||||
if (MusicKit.getInstance().repeatMode == 0) {
|
||||
MusicKit.getInstance().repeatMode = 1
|
||||
}else if(MusicKit.getInstance().repeatMode == 1){
|
||||
} else if (MusicKit.getInstance().repeatMode == 1){
|
||||
MusicKit.getInstance().repeatMode = 2
|
||||
}else{
|
||||
} else {
|
||||
MusicKit.getInstance().repeatMode = 0
|
||||
}
|
||||
},
|
||||
|
|
|
@ -7936,6 +7936,12 @@ fieldset:disabled .btn {
|
|||
filter: contrast(0);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.cd-mediaitem-list-item .heart-icon {
|
||||
height: 18px;
|
||||
width: 39px;
|
||||
filter: contrast(0);
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
@keyframes load-bar {
|
||||
10% {
|
||||
box-shadow: inset 0 -4px 0;
|
||||
|
|
|
@ -1207,6 +1207,14 @@ body[platform="darwin"] .app-chrome .app-chrome-item > .window-controls > div.cl
|
|||
background-repeat: no-repeat;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.heart-icon {
|
||||
height: 9px;
|
||||
width: 13px;
|
||||
filter: contrast(0);
|
||||
background-repeat: no-repeat;
|
||||
margin-left: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.lossless-icon {
|
||||
|
|
|
@ -133,11 +133,11 @@ app.mkapi("artists", false, "412778295", {
|
|||
var library = []
|
||||
var downloaded = null;
|
||||
function downloadChunk () {
|
||||
if(downloaded == null) {
|
||||
if (downloaded == null) {
|
||||
app.mk.api.library.songs("", {limit: 100}, {includeResponseMeta: !0}).then((response)=>{
|
||||
processChunk(response)
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
downloaded.next("", {limit: 100}, {includeResponseMeta: !0}).then((response)=>{
|
||||
processChunk(response)
|
||||
})
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
template: '#artist-chip',
|
||||
async mounted() {
|
||||
let artistId = this.item.id
|
||||
if(typeof this.item.relationships == "object") {
|
||||
if (typeof this.item.relationships == "object") {
|
||||
artistId = this.item.relationships.catalog.data[0].id
|
||||
}
|
||||
app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/artists/${artistId}`).then(response => {
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
app.modals.audioSettings = false
|
||||
},
|
||||
openSpatialAudio() {
|
||||
if(app.cfg.audio.spatial === true && app.cfg.audio.maikiwiAudio.spatial === false) {
|
||||
if (app.cfg.audio.spatial === true && app.cfg.audio.maikiwiAudio.spatial === false) {
|
||||
app.modals.spatialProperties = true
|
||||
app.modals.audioSettings = false
|
||||
} else {
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
},
|
||||
methods: {
|
||||
seekTo(startTime) {
|
||||
if(startTime != 9999999) this.app.seekTo(startTime, false);
|
||||
if (startTime != 9999999) this.app.seekTo(startTime, false);
|
||||
},
|
||||
getActiveLyric() {
|
||||
const delayfix = 0.1
|
||||
|
@ -125,7 +125,7 @@
|
|||
if (app.currentLyricsLine != i) {
|
||||
app.currentLyricsLine = i;
|
||||
if (((app.lyricon && app.drawer.open) || app.appMode == 'fullscreen') && this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${i}"]`)) {
|
||||
if(this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${prevLine}"]`)) {this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${prevLine}"]`).classList.remove("active");}
|
||||
if (this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${prevLine}"]`)) {this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${prevLine}"]`).classList.remove("active");}
|
||||
this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${i}"]`).classList.add("active")
|
||||
if (this.checkIfScrollIsStatic) {
|
||||
let lyricElement = this.$refs.lyricsview.querySelector(`.lyric-line[line-index="${i}"]`)
|
||||
|
|
|
@ -76,9 +76,9 @@
|
|||
}, event)
|
||||
},
|
||||
getVideoPriority() {
|
||||
if(app.cfg.visual.animated_artwork == "always") {
|
||||
if (app.cfg.visual.animated_artwork == "always") {
|
||||
return true;
|
||||
}else if (this.videoPriority && app.cfg.visual.animated_artwork == "limited") {
|
||||
} else if (this.videoPriority && app.cfg.visual.animated_artwork == "limited") {
|
||||
return true
|
||||
} else if (app.cfg.visual.animated_artwork == "disabled") {
|
||||
return false
|
||||
|
|
|
@ -65,6 +65,9 @@
|
|||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="heart-icon" v-if="isLoved">
|
||||
<div class="svg-icon" :style="{'--url': 'url(./assets/feather/heart-fill.svg)'}"></div>
|
||||
</div>
|
||||
<div class="explicit-icon" v-if="item.attributes && item.attributes.contentRating == 'explicit'"></div>
|
||||
<template v-if="showMetaData == true" @dblclick="route()">
|
||||
<div class="metainfo">
|
||||
|
@ -98,7 +101,8 @@
|
|||
displayDuration: true,
|
||||
addClasses: {},
|
||||
itemId: 0,
|
||||
isLibrary: false
|
||||
isLibrary: false,
|
||||
isLoved: null
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -121,6 +125,9 @@
|
|||
} else {
|
||||
this.itemId = this.item.id;
|
||||
}
|
||||
if (this.item.attributes.playParams) {
|
||||
this.getHeartStatus();
|
||||
}
|
||||
let duration = this.item.attributes.durationInMillis ?? 0
|
||||
if (duration == 0 || !this.showDuration) {
|
||||
this.displayDuration = false
|
||||
|
@ -145,7 +152,7 @@
|
|||
},
|
||||
getClasses() {
|
||||
this.addClasses = {}
|
||||
if(typeof this.item.attributes.playParams == "undefined") {
|
||||
if (typeof this.item.attributes.playParams == "undefined") {
|
||||
this.addClasses["disabled"] = true
|
||||
}
|
||||
if (this.classList) {
|
||||
|
@ -178,7 +185,7 @@
|
|||
} else {
|
||||
return this.item.attributes.playParams.kind
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
return this.item.type
|
||||
}
|
||||
},
|
||||
|
@ -323,6 +330,7 @@
|
|||
"hidden": false,
|
||||
"disabled": true,
|
||||
"action": function () {
|
||||
self.isLoved = true
|
||||
app.love(self.item)
|
||||
}
|
||||
},
|
||||
|
@ -333,6 +341,7 @@
|
|||
"name": this.app.getLz('action.unlove'),
|
||||
"hidden": true,
|
||||
"action": function () {
|
||||
self.isLoved = false
|
||||
app.unlove(self.item)
|
||||
}
|
||||
},
|
||||
|
@ -499,6 +508,19 @@
|
|||
visibilityChanged: function (isVisible, entry) {
|
||||
this.isVisible = isVisible
|
||||
},
|
||||
async getHeartStatus() {
|
||||
try {
|
||||
await app.getRating(this.item).then(res => {
|
||||
if (res == 1) {
|
||||
this.isLoved = true
|
||||
} else {
|
||||
this.isLoved = false
|
||||
}
|
||||
})
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
}
|
||||
},
|
||||
addToLibrary() {
|
||||
let item = this.item
|
||||
if (item.attributes.playParams.id) {
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<div class="title text-overflow-elipsis" @click='app.routeView(item)'>
|
||||
{{ item.attributes.name ?? '' }}
|
||||
</div>
|
||||
<div class="subtitle text-overflow-elipsis item-navigate" v-if="item.attributes.artistName" :style = "{'z-index': ((item.attributes.editorialNotes == null) && item.attributes.artistName) ? '4' : ''}" @click="if(item.attributes.artistName)app.searchAndNavigate(item,'artist')">
|
||||
<div class="subtitle text-overflow-elipsis item-navigate" v-if="item.attributes.artistName" :style = "{'z-index': ((item.attributes.editorialNotes == null) && item.attributes.artistName) ? '4' : ''}" @click="if (item.attributes.artistName)app.searchAndNavigate(item,'artist')">
|
||||
{{ item.attributes.artistName ?? '' }}
|
||||
</div>
|
||||
|
||||
|
|
|
@ -93,12 +93,12 @@
|
|||
},
|
||||
async mounted() {
|
||||
await this.getBadges()
|
||||
if(typeof this.item.attributes.playParams == "object") {
|
||||
if(this.item.attributes.playParams.kind.includes("radioStation") && (this.item.attributes.playParams.streamingKind == 1 || this.item.attributes.playParams.streamingKind == 2)) {
|
||||
if (typeof this.item.attributes.playParams == "object") {
|
||||
if (this.item.attributes.playParams.kind.includes("radioStation") && (this.item.attributes.playParams.streamingKind == 1 || this.item.attributes.playParams.streamingKind == 2)) {
|
||||
this.unavailable = true
|
||||
}
|
||||
}else{
|
||||
if(this.item.type == "music-movies" || this.item.type == "tv-episodes") {
|
||||
} else {
|
||||
if (this.item.type == "music-movies" || this.item.type == "tv-episodes") {
|
||||
this.unavailable = true
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +116,7 @@
|
|||
}
|
||||
},
|
||||
getSubtitle() {
|
||||
if(this.kind == 'card') {
|
||||
if (this.kind == 'card') {
|
||||
try {
|
||||
if (typeof this.item.attributes.artistNames != "undefined") {
|
||||
return this.item.attributes.artistNames
|
||||
|
@ -130,7 +130,7 @@
|
|||
}catch(e) {
|
||||
return ''
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
if (typeof this.item.attributes.artistName != "undefined") {
|
||||
return this.item.attributes.artistName
|
||||
} else {
|
||||
|
@ -139,7 +139,7 @@
|
|||
}
|
||||
},
|
||||
getSubtitleNavigation() {
|
||||
if(this.kind == 'card') {
|
||||
if (this.kind == 'card') {
|
||||
try {
|
||||
if (typeof this.item.attributes.artistNames != "undefined") {
|
||||
return app.routeView(this.item)
|
||||
|
@ -153,7 +153,7 @@
|
|||
}catch(e) {
|
||||
return app.routeView(this.item)
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
if (typeof this.item.attributes.artistName != "undefined") {
|
||||
return app.searchAndNavigate(this.item,'artist')
|
||||
} else {
|
||||
|
@ -224,7 +224,7 @@
|
|||
},
|
||||
getArtworkUrl(size = -1, includeUrl = false) {
|
||||
let artwork = this.item.attributes.artwork ? this.item.attributes.artwork.url : ''
|
||||
if(size != -1) {
|
||||
if (size != -1) {
|
||||
artwork = artwork.replace('{w}', size).replace('{h}', size).replace('{f}', "webp").replace('{c}', ((size === 900) ? "sr" : "cc"))
|
||||
}
|
||||
switch (this.kind) {
|
||||
|
@ -232,9 +232,9 @@
|
|||
artwork = this.item.attributes.editorialArtwork?.subscriptionHero?.url ?? (this.item.attributes.artwork?.url ?? (this.item.relationships?.contents?.data[0]?.attributes?.editorialArtwork?.subscriptionHero?.url ?? ''))
|
||||
break;
|
||||
}
|
||||
if(!includeUrl) {
|
||||
if (!includeUrl) {
|
||||
return artwork
|
||||
}else{
|
||||
} else {
|
||||
return `url("${artwork}")`
|
||||
}
|
||||
},
|
||||
|
@ -442,7 +442,7 @@
|
|||
if (self.item.relationships.catalog){
|
||||
app.mkapi(self.item.attributes.playParams.kind, false, self.item.relationships.catalog.data[0].id).then(u => {self.app.copyToClipboard((u.data.data.length && u.data.data.length > 0)? u.data.data[0].attributes.url : u.data.data.attributes.url)})
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
self.app.copyToClipboard(self.item.attributes.url)}
|
||||
}
|
||||
},
|
||||
|
@ -454,7 +454,7 @@
|
|||
if (self.item.relationships.catalog){
|
||||
app.mkapi(self.item.attributes.playParams.kind, false, self.item.relationships.catalog.data[0].id).then(u => {self.app.songLinkShare((u.data.data.length && u.data.data.length > 0)? u.data.data[0].attributes.url : u.data.data.attributes.url)})
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
self.app.songLinkShare(self.item.attributes.url)}
|
||||
}
|
||||
}
|
||||
|
@ -471,10 +471,10 @@
|
|||
|
||||
try {
|
||||
await this.isInLibrary().then((_) => {
|
||||
if(self.addedToLibrary) {
|
||||
if (self.addedToLibrary) {
|
||||
menus.normal.items.find(x => x.id == 'addToLibrary').hidden = true
|
||||
menus.normal.items.find(x => x.id == 'removeFromLibrary').hidden = false
|
||||
}else{
|
||||
} else {
|
||||
menus.normal.items.find(x => x.id == 'addToLibrary').disabled = false
|
||||
}
|
||||
})
|
||||
|
@ -530,7 +530,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
if(self.app.cfg.home.followedArtists.includes(this.item.id)) {
|
||||
if (self.app.cfg.home.followedArtists.includes(this.item.id)) {
|
||||
followAction = "unfollow"
|
||||
}
|
||||
app.showMenuPanel({
|
||||
|
|
|
@ -70,8 +70,8 @@
|
|||
this.history = history.data.data
|
||||
},
|
||||
select(e, position) {
|
||||
if(e.ctrlKey || e.shiftKey) {
|
||||
if(this.selectedItems.indexOf(position) == -1) {
|
||||
if (e.ctrlKey || e.shiftKey) {
|
||||
if (this.selectedItems.indexOf(position) == -1) {
|
||||
this.selectedItems.push(position)
|
||||
} else {
|
||||
this.selectedItems.splice(this.selectedItems.indexOf(position), 1)
|
||||
|
@ -83,7 +83,7 @@
|
|||
queueContext(event, item, position) {
|
||||
let self = this
|
||||
let useMenu = "single"
|
||||
if(this.selectedItems.length > 1) {
|
||||
if (this.selectedItems.length > 1) {
|
||||
useMenu = "multiple"
|
||||
}
|
||||
let menus = {
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
},
|
||||
methods: {
|
||||
playlistSelect(playlist) {
|
||||
if(playlist.type != "library-playlist-folders") {
|
||||
if (playlist.type != "library-playlist-folders") {
|
||||
this.addToPlaylist(playlist.id)
|
||||
}
|
||||
},
|
||||
|
|
|
@ -294,7 +294,7 @@
|
|||
this.room_materials = JSON.parse(JSON.stringify(this.$root.cfg.audio.spatial_properties.room_materials))
|
||||
this.audio_position = JSON.parse(JSON.stringify(this.$root.cfg.audio.spatial_properties.audio_position))
|
||||
this.listener_position = JSON.parse(JSON.stringify(this.$root.cfg.audio.spatial_properties.listener_position))
|
||||
if(typeof this.app.mk.nowPlayingItem != "undefined") {
|
||||
if (typeof this.app.mk.nowPlayingItem != "undefined") {
|
||||
this.setRoom()
|
||||
}
|
||||
this.ready = true
|
||||
|
@ -320,7 +320,7 @@
|
|||
},
|
||||
objectContainerStyle() {
|
||||
let scale = 1
|
||||
if(this.room_dimensions.width * this.visualMultiplier > 300) {
|
||||
if (this.room_dimensions.width * this.visualMultiplier > 300) {
|
||||
scale = 300 / (this.room_dimensions.width * this.visualMultiplier)
|
||||
}
|
||||
let style = {
|
||||
|
@ -346,7 +346,7 @@
|
|||
window.CiderAudio.audioNodes.spatialNode.setRoomProperties(this.room_dimensions, this.room_materials);
|
||||
CiderAudio.audioNodes.spatialInput.setPosition(...this.audio_position)
|
||||
CiderAudio.audioNodes.spatialNode.setListenerPosition(...this.listener_position)
|
||||
if(!this.app.cfg.audio.normalization) {
|
||||
if (!this.app.cfg.audio.normalization) {
|
||||
window.CiderAudio.audioNodes.gainNode.gain.value = app.cfg.audio.spatial_properties.gain
|
||||
}
|
||||
}
|
||||
|
|
|
@ -172,7 +172,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
if(this.app.cfg.home.followedArtists.includes(self.data.id)) {
|
||||
if (this.app.cfg.home.followedArtists.includes(self.data.id)) {
|
||||
followAction = "unfollow"
|
||||
}
|
||||
app.showMenuPanel({
|
||||
|
|
|
@ -132,9 +132,9 @@
|
|||
self.themes = []
|
||||
notyf.success(app.getLz('settings.notyf.visual.plugin.install.success'));
|
||||
bootbox.confirm(app.getLz("settings.prompt.visual.plugin.github.success"), (ok)=>{
|
||||
if(ok) {
|
||||
if (ok) {
|
||||
ipcRenderer.invoke("relaunchApp")
|
||||
}else{
|
||||
} else {
|
||||
return
|
||||
}
|
||||
})
|
||||
|
@ -154,9 +154,9 @@
|
|||
if (arg.success) {
|
||||
self.themes = ipcRenderer.sendSync("get-themes")
|
||||
bootbox.confirm(app.getLz("settings.prompt.visual.plugin.github.success"), (ok)=>{
|
||||
if(ok) {
|
||||
if (ok) {
|
||||
ipcRenderer.invoke("relaunchApp")
|
||||
}else{
|
||||
} else {
|
||||
return
|
||||
}
|
||||
})
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
},
|
||||
searchPodcasts() {
|
||||
let self = this
|
||||
if(this.search.term == "") {
|
||||
if (this.search.term == "") {
|
||||
return
|
||||
}
|
||||
app.mk.api.v3.podcasts("/v1/catalog/us/search", {term: this.search.term, types: ["podcasts"], limit: 25}).then(response => {
|
||||
|
@ -227,7 +227,7 @@
|
|||
async getNextEpisodes(next, podcastId) {
|
||||
|
||||
let podcastShow = await app.mk.api.v3.podcasts(next)
|
||||
if(podcastId != this.podcastSelected.id) {
|
||||
if (podcastId != this.podcastSelected.id) {
|
||||
return
|
||||
}
|
||||
podcastShow.data.data.forEach(ep => {
|
||||
|
|
|
@ -90,6 +90,9 @@
|
|||
<select class="md-select" style="width:180px;"
|
||||
v-model="$root.cfg.general.resumeTabs.tab">
|
||||
<option value="home">{{$root.getLz('home.title')}}</option>
|
||||
<option value="listen_now">{{$root.getLz('term.listenNow')}}</option>
|
||||
<option value="browse">{{$root.getLz('term.browse')}}</option>
|
||||
<option value="radio">{{$root.getLz('term.radio')}}</option>
|
||||
<option value="library-recentlyadded">{{$root.getLz('term.recentlyAdded')}}</option>
|
||||
<option value="library-songs">{{$root.getLz('term.songs')}}</option>
|
||||
<option value="library-albums">{{$root.getLz('term.albums')}}</option>
|
||||
|
@ -1539,7 +1542,7 @@
|
|||
this.tabIndex = parseInt(window.location.hash.split("/")[1])
|
||||
console.debug("tabIndex", this.tabIndex)
|
||||
this.canChangeHash = true
|
||||
}else{
|
||||
} else {
|
||||
this.canChangeHash = true
|
||||
}
|
||||
})
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
return "https://beta.music.apple.com/assets/product/MissingArtworkMusic.svg"
|
||||
}
|
||||
height = parseInt(height * window.devicePixelRatio)
|
||||
if(width) {
|
||||
if (width) {
|
||||
width = parseInt(width * window.devicePixelRatio)
|
||||
}
|
||||
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900) ? "sr" : "cc"))}`;
|
||||
|
|
|
@ -86,14 +86,14 @@
|
|||
|
||||
if (luma > 140) {
|
||||
return "#aaaaaa"
|
||||
}else{
|
||||
} else {
|
||||
return color
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
getSubtitle() {
|
||||
if(this.kind == 'card') {
|
||||
if (this.kind == 'card') {
|
||||
try {
|
||||
if (typeof this.item.attributes.artistNames != "undefined") {
|
||||
return this.item.attributes.artistNames
|
||||
|
@ -107,7 +107,7 @@
|
|||
}catch(e) {
|
||||
return ''
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
if (typeof this.item.attributes.artistName != "undefined") {
|
||||
return this.item.attributes.artistName
|
||||
} else {
|
||||
|
@ -116,7 +116,7 @@
|
|||
}
|
||||
},
|
||||
getSubtitleNavigation() {
|
||||
if(this.kind == 'card') {
|
||||
if (this.kind == 'card') {
|
||||
try {
|
||||
if (typeof this.item.attributes.artistNames != "undefined") {
|
||||
return app.routeView(this.item)
|
||||
|
@ -130,7 +130,7 @@
|
|||
}catch(e) {
|
||||
return app.routeView(this.item)
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
if (typeof this.item.attributes.artistName != "undefined") {
|
||||
return app.searchAndNavigate(this.item,'artist')
|
||||
} else {
|
||||
|
@ -200,7 +200,7 @@
|
|||
},
|
||||
getArtworkUrl(size = -1, includeUrl = false) {
|
||||
let artwork = this.item.attributes.artwork ? this.item.attributes.artwork.url : ''
|
||||
if(size != -1) {
|
||||
if (size != -1) {
|
||||
artwork = artwork.replace('{w}', size).replace('{h}', size).replace('{f}', "webp").replace('{c}', ((size === 900) ? "sr" : "cc"))
|
||||
}
|
||||
switch (this.kind) {
|
||||
|
@ -208,9 +208,9 @@
|
|||
artwork = this.item.attributes.editorialArtwork.subscriptionHero.url
|
||||
break;
|
||||
}
|
||||
if(!includeUrl) {
|
||||
if (!includeUrl) {
|
||||
return artwork
|
||||
}else{
|
||||
} else {
|
||||
return `url("${artwork}")`
|
||||
}
|
||||
},
|
||||
|
@ -423,10 +423,10 @@
|
|||
|
||||
try {
|
||||
await this.isInLibrary().then((_) => {
|
||||
if(self.addedToLibrary) {
|
||||
if (self.addedToLibrary) {
|
||||
menus.normal.items.find(x => x.id == 'addToLibrary').hidden = true
|
||||
menus.normal.items.find(x => x.id == 'removeFromLibrary').hidden = false
|
||||
}else{
|
||||
} else {
|
||||
menus.normal.items.find(x => x.id == 'addToLibrary').disabled = false
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue