mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-12 08:07:10 -07:00
Check Exist before Rendering Posters/Banners
This commit is contained in:
parent
13bfb73ee9
commit
90018cf487
2 changed files with 11 additions and 7 deletions
|
@ -11,6 +11,7 @@ function findBanner(images) {
|
||||||
|
|
||||||
function getBannerUrl(banner, size) {
|
function getBannerUrl(banner, size) {
|
||||||
if (banner) {
|
if (banner) {
|
||||||
|
if (banner.url.contains('lastWrite')) {
|
||||||
// Remove protocol
|
// Remove protocol
|
||||||
let url = banner.url.replace(/^https?:/, '');
|
let url = banner.url.replace(/^https?:/, '');
|
||||||
url = url.replace('banner.jpg', `banner-${size}.jpg`);
|
url = url.replace('banner.jpg', `banner-${size}.jpg`);
|
||||||
|
@ -18,6 +19,7 @@ function getBannerUrl(banner, size) {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class ArtistBanner extends Component {
|
class ArtistBanner extends Component {
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ function findPoster(images) {
|
||||||
|
|
||||||
function getPosterUrl(poster, size) {
|
function getPosterUrl(poster, size) {
|
||||||
if (poster) {
|
if (poster) {
|
||||||
|
if (poster.url.contains('lastWrite')) {
|
||||||
// Remove protocol
|
// Remove protocol
|
||||||
let url = poster.url.replace(/^https?:/, '');
|
let url = poster.url.replace(/^https?:/, '');
|
||||||
url = url.replace('poster.jpg', `poster-${size}.jpg`);
|
url = url.replace('poster.jpg', `poster-${size}.jpg`);
|
||||||
|
@ -18,6 +19,7 @@ function getPosterUrl(poster, size) {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class ArtistPoster extends Component {
|
class ArtistPoster extends Component {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue