Fallback to remote url for backdrop image

This commit is contained in:
Bogdan 2024-06-10 14:21:50 +03:00
parent 69ad0caf40
commit a8eea20d69
1 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,3 @@
import _ from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import TextTruncate from 'react-text-truncate';
@ -51,7 +50,8 @@ const defaultFontSize = parseInt(fonts.defaultFontSize);
const lineHeight = parseFloat(fonts.lineHeight);
function getFanartUrl(images) {
return _.find(images, { coverType: 'fanart' })?.url;
const image = images.find((img) => img.coverType === 'fanart');
return image?.url ?? image?.remoteUrl;
}
class MovieDetails extends Component {