Preserve the protocol for fanart images

This commit is contained in:
Bogdan 2023-09-18 17:45:35 +03:00 committed by Mark McDowall
parent 07f816ffb1
commit d8633b9688
1 changed files with 1 additions and 5 deletions

View File

@ -45,11 +45,7 @@ const defaultFontSize = parseInt(fonts.defaultFontSize);
const lineHeight = parseFloat(fonts.lineHeight); const lineHeight = parseFloat(fonts.lineHeight);
function getFanartUrl(images) { function getFanartUrl(images) {
const fanartImage = _.find(images, { coverType: 'fanart' }); return _.find(images, { coverType: 'fanart' })?.url;
if (fanartImage) {
// Remove protocol
return fanartImage.url.replace(/^https?:/, '');
}
} }
function getExpandedState(newState) { function getExpandedState(newState) {