Merge branch 'main' into enhancement/radio
This commit is contained in:
commit
f1fb5e7cb7
34 changed files with 75755 additions and 25524 deletions
25453
src/renderer/apple-hls-old.js
Normal file
25453
src/renderer/apple-hls-old.js
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -254,6 +254,9 @@
|
|||
height: 32px;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.cd-queue-item:hover {
|
||||
background: var(--selected);
|
||||
}
|
||||
.cd-queue-item.selected {
|
||||
background: var(--selected);
|
||||
}
|
||||
|
|
|
@ -306,6 +306,10 @@
|
|||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--selected);
|
||||
}
|
||||
|
||||
&.selected {
|
||||
background: var(--selected);
|
||||
}
|
||||
|
|
|
@ -1637,4 +1637,29 @@
|
|||
background: transparent;
|
||||
border : 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.content-inner.cider-multiroom{
|
||||
padding: 0px;
|
||||
.detail{
|
||||
padding: 32px;
|
||||
}
|
||||
.header-desc{
|
||||
font-size: 1em;
|
||||
font-weight: 400;
|
||||
}
|
||||
.artworkContainer{
|
||||
height: 300px;
|
||||
width : 100%;
|
||||
img{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
object-fit: cover;
|
||||
filter: unset;
|
||||
&:last-child{
|
||||
transform: unset;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -55,6 +55,7 @@ const app = new Vue({
|
|||
},
|
||||
showingPlaylist: [],
|
||||
appleCurator: [],
|
||||
multiroom: [],
|
||||
artistPage: {
|
||||
data: {},
|
||||
},
|
||||
|
@ -820,7 +821,13 @@ const app = new Vue({
|
|||
CiderAudio.audioNodes.gainNode.gain.value = gain
|
||||
} catch (e) { }
|
||||
}
|
||||
} catch (e) { ipcRenderer.send('SoundCheckTag', event, tag); } // brute force until it works
|
||||
} catch (e) {
|
||||
try { ipcRenderer.send('SoundCheckTag', event, tag); }
|
||||
catch (e) {
|
||||
try {ipcRenderer.send('SoundCheckTag', event, tag);}
|
||||
catch (e) {console.log("[Cider][MaikiwiSoundCheck] Error [Gave up after 3 consecutive attempts]: " + e)}
|
||||
}
|
||||
} // brute force until it works
|
||||
})
|
||||
|
||||
ipcRenderer.on('play', function (_event, mode, id) {
|
||||
|
@ -913,7 +920,7 @@ const app = new Vue({
|
|||
}
|
||||
let type = (self.mk.nowPlayingItem != null) ? self.mk.nowPlayingItem["type"] ?? '' : '';
|
||||
|
||||
if (type.includes("musicVideo") || type.includes("uploadedVideo") || type.includes("music-movie")) {
|
||||
if (type.includes("musicVideo") || type.includes("uploadedVideo") || type.includes("music-movie") || (self.mk.nowPlayingItem?.type == "radioStation" & self.mk.nowPlayingItem?.attributes?.mediaKind == "video")) {
|
||||
document.getElementById("apple-music-video-container").style.display = "block";
|
||||
document.body.setAttribute("video-playing", "true")
|
||||
// app.chrome.topChromeVisible = false
|
||||
|
@ -1680,10 +1687,9 @@ const app = new Vue({
|
|||
})
|
||||
},
|
||||
routeView(item) {
|
||||
let kind = (item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')) : (item.type ?? ''));
|
||||
let id = (item.attributes.playParams ? (item.attributes.playParams.id ?? (item.id ?? '')) : (item.id ?? ''));
|
||||
;
|
||||
let isLibrary = item.attributes.playParams ? (item.attributes.playParams.isLibrary ?? false) : false;
|
||||
let kind = (item.attributes?.playParams ? (item.attributes?.playParams?.kind ?? (item.type ?? '')) : (item.type ?? ''));
|
||||
let id = (item.attributes?.playParams ? (item.attributes?.playParams?.id ?? (item.id ?? '')) : (item.id ?? ''));
|
||||
let isLibrary = item.attributes?.playParams ? (item.attributes?.playParams?.isLibrary ?? false) : false;
|
||||
if (kind.includes("playlist") || kind.includes("album")) {
|
||||
app.showingPlaylist = [];
|
||||
}
|
||||
|
@ -1697,14 +1703,39 @@ const app = new Vue({
|
|||
});
|
||||
window.location.hash = `${kind}/${id}`
|
||||
document.querySelector("#app-content").scrollTop = 0
|
||||
} else if (kind == "editorial-elements") {
|
||||
} else if (kind == "editorial-elements" || kind == "editorial-items") {
|
||||
console.debug(item)
|
||||
if (item.relationships?.contents?.data != null && item.relationships?.contents?.data.length > 0) {
|
||||
this.routeView(item.relationships.contents.data[0])
|
||||
} else if (item.attributes?.link?.url != null) {
|
||||
window.open(item.attributes.link.url)
|
||||
if (item.attributes.link.url.includes("viewMultiRoom")) {
|
||||
const params = new Proxy(new URLSearchParams(item.attributes.link.url), {
|
||||
get: (searchParams, prop) => searchParams.get(prop),
|
||||
});
|
||||
id = params.fcId
|
||||
app.getTypeFromID("multiroom", id, false, {
|
||||
platform: "web",
|
||||
extend: "editorialArtwork,uber,lockupStyle"
|
||||
}).then(()=> {
|
||||
kind = "multiroom"
|
||||
window.location.hash = `${kind}/${id}`
|
||||
document.querySelector("#app-content").scrollTop = 0
|
||||
})
|
||||
|
||||
return;
|
||||
} else {
|
||||
window.open(item.attributes.link.url)}
|
||||
}
|
||||
|
||||
} else if (kind == "multirooms"){
|
||||
app.getTypeFromID("multiroom", id, false, {
|
||||
platform: "web",
|
||||
extend: "editorialArtwork,uber,lockupStyle"
|
||||
}).then(()=> {
|
||||
kind = "multiroom"
|
||||
window.location.hash = `${kind}/${id}`
|
||||
document.querySelector("#app-content").scrollTop = 0
|
||||
})
|
||||
} else if (kind.toString().includes("artist")) {
|
||||
app.getArtistInfo(id, isLibrary)
|
||||
window.location.hash = `${kind}/${id}${isLibrary ? "/" + isLibrary : ''}`
|
||||
|
@ -1947,6 +1978,8 @@ const app = new Vue({
|
|||
} finally {
|
||||
if (kind == "appleCurator") {
|
||||
app.appleCurator = a.data.data[0]
|
||||
} else if (kind == "multiroom"){
|
||||
app.multiroom = a.data.data[0]
|
||||
} else {
|
||||
this.getPlaylistContinuous(a, true)
|
||||
}
|
||||
|
@ -1954,6 +1987,8 @@ const app = new Vue({
|
|||
} finally {
|
||||
if (kind == "appleCurator") {
|
||||
app.appleCurator = a.data.data[0]
|
||||
} else if (kind == "multiroom"){
|
||||
app.multiroom = a.data.data[0]
|
||||
} else {
|
||||
this.getPlaylistContinuous(a, true)
|
||||
}
|
||||
|
@ -2168,6 +2203,13 @@ const app = new Vue({
|
|||
sortArtists()
|
||||
}
|
||||
},
|
||||
focusSearch() {
|
||||
app.appRoute('search')
|
||||
const search = document.getElementsByClassName("search-input")
|
||||
if (search.length > 0) {
|
||||
search[0].focus()
|
||||
}
|
||||
},
|
||||
getSidebarItemClass(page) {
|
||||
if (this.page == page) {
|
||||
return ["active"]
|
||||
|
@ -2187,7 +2229,10 @@ const app = new Vue({
|
|||
}
|
||||
let truemethod = (!method.endsWith("s")) ? (method + "s") : method;
|
||||
try {
|
||||
if (library) {
|
||||
if (method.includes(`multiroom`)) {
|
||||
return await this.mk.api.v3.music(`v1/editorial/${app.mk.storefrontId}/${truemethod}/${term.toString()}`, params, params2)
|
||||
}
|
||||
else if (library) {
|
||||
return await this.mk.api.v3.music(`v1/me/library/${truemethod}/${term.toString()}`, params, params2)
|
||||
} else {
|
||||
return await this.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/${truemethod}/${term.toString()}`, params, params2)
|
||||
|
|
|
@ -1605,6 +1605,7 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb {
|
|||
margin: 10px;
|
||||
margin-left: 5%;
|
||||
margin-right: 0px;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.lyric-line.active .verse {
|
||||
|
|
|
@ -45,9 +45,9 @@
|
|||
</transition>
|
||||
<div id="apple-music-video-container">
|
||||
<div id="apple-music-video-player-controls">
|
||||
<div id="player-exit" title="Close" @click="exitMV()">
|
||||
<div id="player-exit" title="Close" @click="exitMV();fullscreen(false);">
|
||||
<svg fill="white" xmlns="http://www.w3.org/2000/svg" width="21" height="21" viewBox="0 0 21 21"
|
||||
aria-role="presentation" focusable="false">
|
||||
aria-role="presentation" focusable="false" @click="exitMV();fullscreen(false);">
|
||||
<path
|
||||
d="M10.5 21C4.724 21 0 16.275 0 10.5S4.724 0 10.5 0 21 4.725 21 10.5 16.276 21 10.5 21zm-3.543-5.967a.96.96 0 00.693-.295l2.837-2.842 2.85 2.842c.167.167.41.295.693.295.552 0 1.001-.461 1.001-1.012 0-.281-.115-.512-.295-.704L11.899 10.5l2.85-2.855a.875.875 0 00.295-.68c0-.55-.45-.998-1.001-.998a.871.871 0 00-.668.295l-2.888 2.855-2.862-2.843a.891.891 0 00-.668-.281.99.99 0 00-1.001.986c0 .269.116.512.295.678L9.088 10.5l-2.837 2.843a.926.926 0 00-.295.678c0 .551.45 1.012 1.001 1.012z"
|
||||
fill-rule="nonzero"/>
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
<script type="text/x-template" id="mediaitem-mvview-sp">
|
||||
<div style="position: relative; display: inline-flex;">
|
||||
<div @click.self='app.routeView(item)'
|
||||
<div @click.self='log(item);app.routeView(item)'
|
||||
class="cd-mediaitem-mvview">
|
||||
<div style="height: 70px; min-height: 70px; max-height: 70px; width: 100%; margin-left: 5px;">
|
||||
<div class="title-browse-sp bold " @click='app.routeView(item)' style="color: darkgrey;">
|
||||
{{ badge ? badge.designBadge : ''}}
|
||||
<div class="title-browse-sp bold " @click='log(item);app.routeView(item)' style="color: darkgrey;">
|
||||
{{ badge ? badge?.designBadge : ''}}
|
||||
</div>
|
||||
<div class="title-browse-sp ">
|
||||
{{ (badge != null && badge.designTag != null) ? badge.designTag : (item.attributes.name ?? '') }}
|
||||
{{ (badge != null && badge?.designTag != null) ? badge?.designTag : (item.attributes?.name ?? '') }}
|
||||
</div>
|
||||
<div class="title-browse-sp semibold" style="color: darkgrey;">
|
||||
{{ (item.attributes.artistName ?? (item.attributes.curatorName ?? '')) }}
|
||||
{{ (item?.attributes?.artistName ?? (item?.attributes?.curatorName ?? '')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="artwork">
|
||||
<mediaitem-artwork
|
||||
:url="item.attributes.artwork ? 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 : '')) : '' "
|
||||
:url="item.attributes?.artwork ? 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>
|
||||
</div>
|
||||
<div class="cd-mediaitem-mvview-overlay" @click.self='app.routeView(item)'>
|
||||
<div class="cd-mediaitem-mvview-overlay" @click.self='log(item);app.routeView(item)'>
|
||||
<div class="button" style="
|
||||
border-radius: 50%;
|
||||
background: rgba(50,50,50,0.7);"
|
||||
:style="[(!(item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')): (item.type ?? '')).includes('radioStation') && !(item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')): (item.type ?? '')).includes('song')) ?
|
||||
:style="[(!(item.attributes?.playParams ? (item.attributes?.playParams?.kind ?? (item.type ?? '')): (item.type ?? '')).includes('radioStation') && !(item.attributes?.playParams ? (item.attributes?.playParams?.kind ?? (item.type ?? '')): (item.type ?? '')).includes('song')) ?
|
||||
{'margin': '205px',
|
||||
'margin-left': '260px', 'margin-bottom': '140px',
|
||||
width: '30px',
|
||||
|
@ -37,11 +37,11 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cd-mediaitem-mvview-overlay" @click.self='app.routeView(item)' tabindex="0">
|
||||
<div class="cd-mediaitem-mvview-overlay" @click.self='log(item);app.routeView(item)' tabindex="0">
|
||||
<div class="button" style="
|
||||
border-radius: 50%;
|
||||
background: rgba(50,50,50,0.7);"
|
||||
:style="[(!(item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')): (item.type ?? '')).includes('radioStation') && !(item.attributes.playParams ? (item.attributes.playParams.kind ?? (item.type ?? '')): (item.type ?? '')).includes('song')) ?
|
||||
:style="[(!(item.attributes?.playParams ? (item.attributes?.playParams?.kind ?? (item.type ?? '')): (item.type ?? '')).includes('radioStation') && !(item.attributes?.playParams ? (item.attributes?.playParams?.kind ?? (item.type ?? '')): (item.type ?? '')).includes('song')) ?
|
||||
{'margin': '205px',
|
||||
'margin-left': '260px', 'margin-bottom': '140px',
|
||||
width: '30px',
|
||||
|
@ -65,6 +65,10 @@
|
|||
app: this.$root,
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
methods: {
|
||||
log(item) {
|
||||
console.log(item);
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -2,9 +2,12 @@
|
|||
<vue-horizontal>
|
||||
<template v-if="browsesp">
|
||||
<mediaitem-mvview-sp
|
||||
:item="item ? ((item.attributes?.kind != null || item.attributes?.type == 'editorial-elements') ? item : ((item.relationships && item.relationships.contents ) ? item.relationships.contents.data[0] : item)) : []"
|
||||
:item="
|
||||
((item?.attributes?.kind != null || item?.attributes?.type == 'editorial-elements')
|
||||
? item :
|
||||
((item.relationships && item.relationships.contents ) ? item.relationships.contents.data[0] : item)) ?? (item)"
|
||||
:imagesize="imagesize"
|
||||
:badge="item.attributes" v-for="item in items"></mediaitem-mvview-sp>
|
||||
:badge="item.attributes ?? [] " v-for="item in items"></mediaitem-mvview-sp>
|
||||
</template>
|
||||
<template v-else>
|
||||
<mediaitem-square :kind="kind" size="600" :key="item?.id ?? ''"
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="info-rect" :class="{'info-rect-card': kind == 'card'}" :style="{'--bgartwork': getArtworkUrl(size, true)}">
|
||||
<div class="title" :title="item.attributes?.name ?? (item.relationships?.contents?.data[0]?.attributes?.name ?? '')" v-if="item.attributes.artistNames == null || kind!= 'card'" @click='app.routeView(item)'>
|
||||
<div class="item-navigate text-overflow-elipsis">{{ item.attributes?.name ?? (item.relationships?.contents?.data[0]?.attributes?.name ?? '') }}</div>
|
||||
<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 ?? (item.relationships?.contents?.data[0]?.attributes?.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>
|
||||
</div>
|
||||
<div :title="getSubtitle()" class="subtitle item-navigate text-overflow-elipsis" @click="getSubtitleNavigation()"
|
||||
|
@ -87,8 +87,8 @@
|
|||
isVisible: false,
|
||||
addedToLibrary: false,
|
||||
guid: this.uuidv4(),
|
||||
noplay: ["apple-curators", "editorial-elements"],
|
||||
nomenu: ["stations", "apple-curators", "editorial-elements"],
|
||||
noplay: ["apple-curators", "editorial-elements", "editorial-items"],
|
||||
nomenu: ["stations", "apple-curators", "editorial-elements", "editorial-items"],
|
||||
app: this.$root,
|
||||
badges: this.$root.socialBadges.badgeMap,
|
||||
itemBadges: [],
|
||||
|
@ -125,7 +125,7 @@
|
|||
if (typeof this.item.attributes.artistNames != "undefined") {
|
||||
return this.item.attributes.artistNames
|
||||
} else if (typeof this.item.attributes.editorialNotes != "undefined") {
|
||||
return this.item.attributes.editorialNotes.short
|
||||
return this.item?.attributes?.editorialNotes?.short ?? (this.item.attributes?.editorialNotes?.name ?? '')
|
||||
} else if (typeof this.item.attributes.artistName != "undefined") {
|
||||
return this.item.attributes.artistName
|
||||
} else {
|
||||
|
@ -227,7 +227,7 @@
|
|||
);
|
||||
},
|
||||
getArtworkUrl(size = -1, includeUrl = false) {
|
||||
let artwork = this.item.attributes.artwork ? this.item.attributes.artwork.url : ''
|
||||
let artwork = this.item?.attributes?.artwork ? this.item?.attributes?.artwork?.url : (this.item?.attributes?.editorialArtwork?.subscriptionCover?.url ?? '')
|
||||
if (size != -1) {
|
||||
artwork = artwork.replace('{w}', size).replace('{h}', size).replace('{f}', "webp").replace('{c}', ((size === 900) ? "sr" : "cc"))
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
</div>
|
||||
<div class="col queue-info">
|
||||
<div class="queue-title text-overflow-elipsis">{{ queueItem.item.attributes.name }}</div>
|
||||
<div class="queue-subtitle text-overflow-elipsis">{{ queueItem.item.attributes.albumName }} — {{ queueItem.item.attributes.artistName }}</div>
|
||||
<div class="queue-subtitle text-overflow-elipsis">{{ queueItem.item.attributes.artistName }} — {{ queueItem.item.attributes.albumName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -37,6 +37,6 @@
|
|||
return {
|
||||
app: this.$root
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
48
src/renderer/views/pages/cider-multiroom.ejs
Normal file
48
src/renderer/views/pages/cider-multiroom.ejs
Normal file
|
@ -0,0 +1,48 @@
|
|||
<script type="text/x-template" id="cider-multiroom">
|
||||
<div class="content-inner cider-multiroom">
|
||||
<div class="artworkContainer">
|
||||
<artwork-material :url="data.attributes.uber.masterArt.url" size="800" images="1"></artwork-material>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<h1 class="header-text">{{data.attributes?.title ?? ""}}</h1>
|
||||
<h2 class="header-desc" v-html='data.relationships?.children?.data[0]?.attributes?.description ?? ""'></h2>
|
||||
<template v-if="data.relationships">
|
||||
<template v-for="(recom,index) in data.relationships.children.data">
|
||||
<div class="row">
|
||||
<div class="col" v-if="recom.attributes.name != 'Chart Set'">
|
||||
<h3>{{ recom.attributes?.title ?? ""}}</h3>
|
||||
</div>
|
||||
<div class="col-auto flex-center" v-if="index != 0 && recom.relationships && ((recom.relationships.children && recom.relationships.children.data.length > 10) || (recom.relationships.contents && recom.relationships.contents.data.length > 10))">
|
||||
<button class="cd-btn-seeall" @click="app.showCollection(recom.relationships.children ? recom.relationships.children : recom.relationships.contents, recom.attributes.name ?? '', 'listen_now')" >{{app.getLz('term.seeAll')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
<template v-if="recom.relationships && ((recom.relationships.children && recom.relationships.children.data) || (recom.relationships.contents && recom.relationships.contents.data))">
|
||||
<template v-if="(recom.attributes.name && recom.attributes.name.includes('ideo')) || index === 0">
|
||||
<mediaitem-scroller-horizontal-mvview :imagesize="800" :browsesp="index == 0"
|
||||
:items="recom.relationships.children ? recom.relationships.children.data.limit(10) : recom.relationships.contents.data.limit(10)"></mediaitem-scroller-horizontal-mvview>
|
||||
</template>
|
||||
<template v-else-if="recom.attributes.name == 'Chart Set'">
|
||||
|
||||
</template>
|
||||
<template v-else>
|
||||
<mediaitem-scroller-horizontal-large
|
||||
:items="recom.relationships.children ? recom.relationships.children.data.limit(10) : recom.relationships.contents.data.limit(10)"></mediaitem-scroller-horizontal-large>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('cider-multiroom', {
|
||||
template: "#cider-multiroom",
|
||||
props: ["data"],
|
||||
data: function() {
|
||||
return {
|
||||
app: this.$root
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
|
@ -78,7 +78,7 @@
|
|||
},
|
||||
methods: {
|
||||
getArtistPalette(artist) {
|
||||
if (artist["attributes"]["artwork"]) {
|
||||
if (artist?.attributes?.artwork != null) {
|
||||
return {
|
||||
"background": "#" + artist["attributes"]["artwork"]["bgColor"],
|
||||
"color": "#" + artist["attributes"]["artwork"]["textColor1"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue