1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-22 07:42:28 +00:00

Preserve the protocol for fanart images

(cherry picked from commit d8633b968830fd20d73612e9f0d0559b0bcb304c)

Closes #4145
This commit is contained in:
Bogdan 2023-09-18 17:45:35 +03:00
parent 6e479235cb
commit 44add0d884
2 changed files with 2 additions and 10 deletions

View file

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

View file

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