Merge branch 'main' into enhancement/radio

This commit is contained in:
Core 2022-05-21 12:42:45 +01:00 committed by GitHub
commit f1fb5e7cb7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 75755 additions and 25524 deletions

View file

@ -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"/>

View file

@ -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>

View file

@ -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 ?? ''"

View file

@ -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"))
}

View file

@ -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>

View file

@ -37,6 +37,6 @@
return {
app: this.$root
}
},
}
})
</script>

View 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>

View file

@ -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"],