Merge branch 'main' into enhancement/radio
This commit is contained in:
commit
6a86f78837
2 changed files with 579 additions and 557 deletions
|
@ -52,6 +52,7 @@
|
|||
"term.navigateForward": "Nyavigate fowwawd",
|
||||
"term.play": "Pway",
|
||||
"term.pause": "Pause",
|
||||
"term.stop": "Stop",
|
||||
"term.previous": "Pwevious",
|
||||
"term.next": "Nyext",
|
||||
"term.shuffle": "Shuffwe",
|
||||
|
@ -257,6 +258,9 @@
|
|||
"action.tray.minimize": "Minyimize to Tway",
|
||||
"action.tray.quit": "Quit",
|
||||
"action.tray.show": "Show Cidew",
|
||||
"action.tray.playpause": "Pway/Pause",
|
||||
"action.tray.next": "Nyext",
|
||||
"action.tray.previous": "Pwevious",
|
||||
"action.update": "Update",
|
||||
"action.install": "Instaww",
|
||||
"action.copy": "Copy",
|
||||
|
|
|
@ -39,12 +39,20 @@
|
|||
</div>
|
||||
</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 ?? (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 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 ?? (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 :title="getSubtitle()" class="subtitle item-navigate text-overflow-elipsis" @click="getSubtitleNavigation()"
|
||||
<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()"
|
||||
v-if="getSubtitle() != ''">
|
||||
{{ getSubtitle() }}
|
||||
</div>
|
||||
|
@ -109,20 +117,21 @@
|
|||
},
|
||||
methods: {
|
||||
getBgColor() {
|
||||
let color = `#${(this.item.attributes.artwork != null && this.item.attributes.artwork.bgColor != null) ? (this.item.attributes.artwork.bgColor) : ``}`
|
||||
return color
|
||||
return `#${(this.item.attributes.artwork != null && this.item.attributes.artwork.bgColor != null) ? (this.item.attributes.artwork.bgColor) : ``}`
|
||||
},
|
||||
getContextMenu(event) {
|
||||
if (this.item.type == "artists") {
|
||||
if (this.item.type === "artists") {
|
||||
return this.artistMenu(event)
|
||||
} else {
|
||||
return this.contextMenu(event)
|
||||
}
|
||||
},
|
||||
getSubtitle() {
|
||||
if (this.kind == 'card') {
|
||||
if (this.kind === 'card' || this.item.type === "playlists") {
|
||||
try {
|
||||
if (typeof this.item.attributes.artistNames != "undefined") {
|
||||
if (typeof this.item.attributes.description.standard != "undefined") {
|
||||
return this.item.attributes.description.standard
|
||||
} else 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 ?? (this.item.attributes?.editorialNotes?.name ?? '')
|
||||
|
@ -143,13 +152,9 @@
|
|||
}
|
||||
},
|
||||
getSubtitleNavigation() {
|
||||
if (this.kind == 'card') {
|
||||
if (this.kind === 'card' || this.item.type === "playlists") {
|
||||
try {
|
||||
if (typeof this.item.attributes.artistNames != "undefined") {
|
||||
return app.routeView(this.item)
|
||||
} else if (typeof this.item.attributes.editorialNotes != "undefined") {
|
||||
return app.routeView(this.item)
|
||||
} else if (typeof this.item.attributes.artistName != "undefined") {
|
||||
if (typeof this.item.attributes.artistName != "undefined") {
|
||||
return app.searchAndNavigate(this.item, 'artist')
|
||||
} else {
|
||||
return app.routeView(this.item)
|
||||
|
@ -191,7 +196,9 @@
|
|||
}
|
||||
let kind = this.item.type ?? this.item.attributes.playParams.kind
|
||||
let truekind = (!kind.endsWith("s")) ? (kind + "s") : kind;
|
||||
if (truekind == "musicVideos") {truekind = "music-videos"}
|
||||
if (truekind === "musicVideos") {
|
||||
truekind = "music-videos"
|
||||
}
|
||||
let res = await app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/?ids[${truekind}]=${this.item.attributes.playParams.id ?? this.item.id}`, params);
|
||||
res = res.data.data[0]
|
||||
this.addedToLibrary = (res && res.attributes && res.attributes.inLibrary) ? res.attributes.inLibrary : false
|
||||
|
@ -207,7 +214,9 @@
|
|||
}
|
||||
let kind = this.item.type ?? this.item.attributes.playParams.kind
|
||||
let truekind = (!kind.endsWith("s")) ? (kind + "s") : kind;
|
||||
if (truekind == "musicVideos") {truekind = "music-videos"}
|
||||
if (truekind == "musicVideos") {
|
||||
truekind = "music-videos"
|
||||
}
|
||||
let res = await app.mk.api.v3.music(`/v1/catalog/${app.mk.storefrontId}/?ids[${truekind}]=${this.item.attributes.playParams.id ?? this.item.id}`, params);
|
||||
res = res.data.data[0]
|
||||
if (res && res.relationships && res.relationships.library && res.relationships.library.data && res.relationships.library.data.length > 0) {
|
||||
|
@ -218,7 +227,8 @@
|
|||
{
|
||||
fetchOptions: {
|
||||
method: "DELETE"
|
||||
}})
|
||||
}
|
||||
})
|
||||
this.addedToLibrary = true
|
||||
},
|
||||
uuidv4() {
|
||||
|
@ -247,9 +257,11 @@
|
|||
try {
|
||||
type = this.item.type
|
||||
|
||||
}catch(e) {console.log('sd',this.item)}
|
||||
} catch (e) {
|
||||
console.log('sd', this.item)
|
||||
}
|
||||
|
||||
if (this.kind != "") {
|
||||
if (this.kind !== "") {
|
||||
type = this.kind
|
||||
}
|
||||
switch (type) {
|
||||
|
@ -444,10 +456,13 @@
|
|||
"action": function () {
|
||||
if (!self.item.attributes.url && self.item.relationships) {
|
||||
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)})
|
||||
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 {
|
||||
self.app.copyToClipboard(self.item.attributes.url)}
|
||||
self.app.copyToClipboard(self.item.attributes.url)
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -456,10 +471,13 @@
|
|||
"action": function () {
|
||||
if (!self.item.attributes.url && self.item.relationships) {
|
||||
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)})
|
||||
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 {
|
||||
self.app.songLinkShare(self.item.attributes.url)}
|
||||
self.app.songLinkShare(self.item.attributes.url)
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue