1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-21 23:33:00 +00: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

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`);
}
}

View file

@ -94,6 +94,7 @@
"@babel/preset-typescript": "7.22.11",
"@types/classnames": "2.3.1",
"@types/lodash": "4.14.194",
"@types/react-lazyload": "3.2.0",
"@types/react-router-dom": "5.3.3",
"@types/react-text-truncate": "0.14.1",
"@types/react-window": "1.8.5",

View file

@ -1443,6 +1443,13 @@
dependencies:
"@types/react" "*"
"@types/react-lazyload@3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@types/react-lazyload/-/react-lazyload-3.2.0.tgz#b763f8f0c724df2c969d7e0b3a56c6aa2720fa1f"
integrity sha512-4+r+z8Cf7L/mgxA1vl5uHx5GS/8gY2jqq2p5r5WCm+nUsg9KilwQ+8uaJA3EUlLj57AOzOfGGwwRJ5LOVl8fwA==
dependencies:
"@types/react" "*"
"@types/react-redux@^7.1.16":
version "7.1.26"
resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.26.tgz#84149f5614e40274bb70fcbe8f7cae6267d548b1"