1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-25 22:46:31 -04:00

Preserve the protocol in Series Image

This commit is contained in:
Bogdan
2023-09-10 18:39:13 +03:00
committed by Mark McDowall
parent f2b0fc946e
commit a2f16bddfd
3 changed files with 11 additions and 5 deletions
+3 -5
View File
@@ -7,12 +7,10 @@ function findImage(images, coverType) {
}
function getUrl(image, coverType, size) {
if (image) {
// Remove protocol
let url = image.url.replace(/^https?:/, '');
url = url.replace(`${coverType}.jpg`, `${coverType}-${size}.jpg`);
const imageUrl = image?.url;
return url;
if (imageUrl) {
return imageUrl.replace(`${coverType}.jpg`, `${coverType}-${size}.jpg`);
}
}