attempt to fix
This commit is contained in:
parent
dd9473b5d1
commit
e77d87ca4b
3 changed files with 9 additions and 4 deletions
|
@ -92,6 +92,11 @@
|
|||
type: Boolean,
|
||||
default: false,
|
||||
required: false
|
||||
},
|
||||
imageformat: {
|
||||
type: String,
|
||||
default: 'cc',
|
||||
required: false
|
||||
},
|
||||
'contextExt': { type: Object, required: false },
|
||||
},
|
||||
|
@ -242,11 +247,11 @@
|
|||
getArtworkUrl(size = -1, includeUrl = false) {
|
||||
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 || size === 380 || size === 600 ) ? "sr" : "bb");
|
||||
artwork = artwork.replace('{w}', size).replace('{h}', size).replace('{f}', "webp").replace('{c}', (size === 900 || size === 380 || size === 600 ) ? "sr" : this.imageformat);
|
||||
}
|
||||
switch (this.kind) {
|
||||
case "385":
|
||||
artwork = this.item.attributes.editorialArtwork?.subscriptionHero?.url ?? (this.item.attributes.artwork?.url ?? (this.item.relationships?.contents?.data[0]?.attributes?.editorialArtwork?.subscriptionHero?.url ?? ''))
|
||||
artwork = (this.item.attributes.editorialArtwork?.subscriptionHero?.url ?? (this.item.attributes.artwork?.url ?? (this.item.relationships?.contents?.data[0]?.attributes?.editorialArtwork?.subscriptionHero?.url ?? ''))).replace('{c}', (size === 900 || size === 380 || size === 600 ) ? "sr" : this.imageformat);
|
||||
break;
|
||||
}
|
||||
if (!includeUrl) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue