optimizations for high dpi artwork
This commit is contained in:
parent
cf147dc437
commit
30feff6dc6
2 changed files with 8 additions and 0 deletions
|
@ -3290,6 +3290,10 @@ const app = new Vue({
|
||||||
if (typeof url == "undefined" || url == "") {
|
if (typeof url == "undefined" || url == "") {
|
||||||
return "https://beta.music.apple.com/assets/product/MissingArtworkMusic.svg"
|
return "https://beta.music.apple.com/assets/product/MissingArtworkMusic.svg"
|
||||||
}
|
}
|
||||||
|
height = parseInt(height * window.devicePixelRatio)
|
||||||
|
if(width) {
|
||||||
|
width = parseInt(width * window.devicePixelRatio)
|
||||||
|
}
|
||||||
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900) ? "sr" : "cc"))}`;
|
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900) ? "sr" : "cc"))}`;
|
||||||
|
|
||||||
if (newurl.includes("900x516")) {
|
if (newurl.includes("900x516")) {
|
||||||
|
|
|
@ -89,6 +89,10 @@
|
||||||
if (typeof url == "undefined" || url == "") {
|
if (typeof url == "undefined" || url == "") {
|
||||||
return "https://beta.music.apple.com/assets/product/MissingArtworkMusic.svg"
|
return "https://beta.music.apple.com/assets/product/MissingArtworkMusic.svg"
|
||||||
}
|
}
|
||||||
|
height = parseInt(height * window.devicePixelRatio)
|
||||||
|
if(width) {
|
||||||
|
width = parseInt(width * window.devicePixelRatio)
|
||||||
|
}
|
||||||
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900) ? "sr" : "cc"))}`;
|
let newurl = `${url.replace('{w}', width ?? height).replace('{h}', height).replace('{f}', "webp").replace('{c}', ((width === 900) ? "sr" : "cc"))}`;
|
||||||
|
|
||||||
if (newurl.includes("900x516")) {
|
if (newurl.includes("900x516")) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue