optimizations for high dpi artwork

This commit is contained in:
booploops 2022-03-23 22:07:53 -07:00
parent cf147dc437
commit 30feff6dc6
2 changed files with 8 additions and 0 deletions

View file

@ -3290,6 +3290,10 @@ const app = new Vue({
if (typeof url == "undefined" || url == "") {
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"))}`;
if (newurl.includes("900x516")) {

View file

@ -89,6 +89,10 @@
if (typeof url == "undefined" || url == "") {
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"))}`;
if (newurl.includes("900x516")) {