1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-02-21 13:37:19 +00:00

Preserve the protocol in Artist Image

Closes #4141
This commit is contained in:
Bogdan 2023-09-18 17:49:26 +03:00
parent 6c34730796
commit 3a74029035
2 changed files with 6 additions and 11 deletions

View file

@ -7,13 +7,10 @@ function findImage(images, coverType) {
}
function getUrl(image, coverType, size) {
if (image) {
// Remove protocol
let url = image.url.replace(/^https?:/, '');
const imageUrl = image?.url;
url = url.replace(`${coverType}.jpg`, `${coverType}-${size}.jpg`);
return url;
if (imageUrl) {
return imageUrl.replace(`${coverType}.jpg`, `${coverType}-${size}.jpg`);
}
}

View file

@ -10,12 +10,10 @@ function findLogo(images) {
}
function getLogoUrl(logo, size) {
if (logo) {
// Remove protocol
let url = logo.url.replace(/^https?:/, '');
url = url.replace('logo.jpg', `logo-${size}.jpg`);
const logoUrl = logo?.url;
return url;
if (logoUrl) {
return logoUrl.replace('logo.jpg', `logo-${size}.jpg`);
}
}