Added play and shuffle to album/playlist pages, formatted album/playlist page

This commit is contained in:
booploops 2021-12-07 15:55:00 -08:00
parent f9a7833b1a
commit bf4c003b80
5 changed files with 91 additions and 21 deletions

View file

@ -919,7 +919,11 @@ const app = new Vue({
}
},
getMediaItemArtwork(url, size = 64) {
return `${url.replace('{w}', size).replace('{h}', size).replace('{f}', "webp").replace('{c}', "cc")}`;
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) {
if (!this.mkReady()) {