Update index.js

This commit is contained in:
booploops 2021-12-07 16:25:07 -08:00
parent 7e4e086792
commit 4d2a06ed8f

View file

@ -920,9 +920,6 @@ const app = new Vue({
},
getMediaItemArtwork(url, size = 64) {
var newurl = `${url.replace('{w}', size).replace('{h}', size).replace('{f}', "webp").replace('{c}', "cc")}`;
// replace the only the last instance of .jpg with .webp but not the first instance
newurl = newurl.replace(/\.jpg(?=\?|$)/, '.webp');
return newurl
},
getNowPlayingArtworkBG(size = 600) {