attempt to fix
This commit is contained in:
parent
dd9473b5d1
commit
e77d87ca4b
3 changed files with 9 additions and 4 deletions
|
@ -3945,7 +3945,7 @@ const app = new Vue({
|
||||||
if (width) {
|
if (width) {
|
||||||
width = parseInt(width * window.devicePixelRatio)
|
width = parseInt(width * window.devicePixelRatio)
|
||||||
}
|
}
|
||||||
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900 || width === 380 || width === 600 ) ? "sr" : "bb"))}`;
|
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900 || width === 380 || width === 600 ) ? "sr" : "cc"))}`;
|
||||||
|
|
||||||
if (newurl.includes("900x516")) {
|
if (newurl.includes("900x516")) {
|
||||||
newurl = newurl.replace("900x516cc", "900x516sr").replace("900x516bb", "900x516sr");
|
newurl = newurl.replace("900x516cc", "900x516sr").replace("900x516bb", "900x516sr");
|
||||||
|
|
|
@ -92,6 +92,11 @@
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
required: false
|
required: false
|
||||||
|
},
|
||||||
|
imageformat: {
|
||||||
|
type: String,
|
||||||
|
default: 'cc',
|
||||||
|
required: false
|
||||||
},
|
},
|
||||||
'contextExt': { type: Object, required: false },
|
'contextExt': { type: Object, required: false },
|
||||||
},
|
},
|
||||||
|
@ -242,11 +247,11 @@
|
||||||
getArtworkUrl(size = -1, includeUrl = false) {
|
getArtworkUrl(size = -1, includeUrl = false) {
|
||||||
let artwork = this.item?.attributes?.artwork ? this.item?.attributes?.artwork?.url : (this.item?.attributes?.editorialArtwork?.subscriptionCover?.url ?? '')
|
let artwork = this.item?.attributes?.artwork ? this.item?.attributes?.artwork?.url : (this.item?.attributes?.editorialArtwork?.subscriptionCover?.url ?? '')
|
||||||
if (size != -1) {
|
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) {
|
switch (this.kind) {
|
||||||
case "385":
|
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;
|
break;
|
||||||
}
|
}
|
||||||
if (!includeUrl) {
|
if (!includeUrl) {
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="categories">
|
<div class="categories">
|
||||||
<mediaitem-square :kind="'385'" size="600"
|
<mediaitem-square :kind="'385'" :imageformat="'bb'" size="600"
|
||||||
:item="item ? (item.attributes.kind ? item : ((item.relationships && item.relationships.contents ) ? item.relationships.contents.data[0] : item)) : []"
|
:item="item ? (item.attributes.kind ? item : ((item.relationships && item.relationships.contents ) ? item.relationships.contents.data[0] : item)) : []"
|
||||||
:imagesize="800"
|
:imagesize="800"
|
||||||
v-for="item of getFlattenedCategories()">
|
v-for="item of getFlattenedCategories()">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue