mirror of
https://github.com/fergalmoran/Readarr.git
synced 2025-12-22 09:29:59 +00:00
Check Exist before Rendering Posters/Banners
This commit is contained in:
@@ -11,12 +11,14 @@ function findBanner(images) {
|
||||
|
||||
function getBannerUrl(banner, size) {
|
||||
if (banner) {
|
||||
if (banner.url.contains('lastWrite')) {
|
||||
// Remove protocol
|
||||
let url = banner.url.replace(/^https?:/, '');
|
||||
url = url.replace('banner.jpg', `banner-${size}.jpg`);
|
||||
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ArtistBanner extends Component {
|
||||
|
||||
@@ -11,12 +11,14 @@ function findPoster(images) {
|
||||
|
||||
function getPosterUrl(poster, size) {
|
||||
if (poster) {
|
||||
if (poster.url.contains('lastWrite')) {
|
||||
// Remove protocol
|
||||
let url = poster.url.replace(/^https?:/, '');
|
||||
url = url.replace('poster.jpg', `poster-${size}.jpg`);
|
||||
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class ArtistPoster extends Component {
|
||||
|
||||
Reference in New Issue
Block a user