description

This commit is contained in:
Core 2022-05-25 03:04:26 +01:00
parent 4924c090ee
commit ad570e969b
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6

View file

@ -109,20 +109,21 @@
}, },
methods: { methods: {
getBgColor() { getBgColor() {
let color = `#${(this.item.attributes.artwork != null && this.item.attributes.artwork.bgColor != null) ? (this.item.attributes.artwork.bgColor) : ``}` return `#${(this.item.attributes.artwork != null && this.item.attributes.artwork.bgColor != null) ? (this.item.attributes.artwork.bgColor) : ``}`
return color
}, },
getContextMenu(event) { getContextMenu(event) {
if (this.item.type == "artists") { if (this.item.type === "artists") {
return this.artistMenu(event) return this.artistMenu(event)
} else { } else {
return this.contextMenu(event) return this.contextMenu(event)
} }
}, },
getSubtitle() { getSubtitle() {
if (this.kind == 'card' || this.item.type == "playlists") { if (this.kind === 'card' || this.item.type === "playlists") {
try { 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 return this.item.attributes.artistNames
} else if (typeof this.item.attributes.editorialNotes != "undefined") { } else if (typeof this.item.attributes.editorialNotes != "undefined") {
return this.item?.attributes?.editorialNotes?.short ?? (this.item.attributes?.editorialNotes?.name ?? '') return this.item?.attributes?.editorialNotes?.short ?? (this.item.attributes?.editorialNotes?.name ?? '')
@ -143,13 +144,9 @@
} }
}, },
getSubtitleNavigation() { getSubtitleNavigation() {
if (this.kind == 'card' || this.item.type == "playlists") { if (this.kind === 'card' || this.item.type === "playlists") {
try { try {
if (typeof this.item.attributes.artistNames != "undefined") { if (typeof this.item.attributes.artistName != "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") {
return app.searchAndNavigate(this.item,'artist') return app.searchAndNavigate(this.item,'artist')
} else { } else {
return app.routeView(this.item) return app.routeView(this.item)