Fixed: (UI) Show studio and release/added dates in movie index

pull/8590/head
Bogdan 2 years ago
parent 29ba6fe556
commit a1ccfacfa2

@ -41,6 +41,7 @@ function MovieIndexPoster(props: MovieIndexPosterProps) {
showTitle, showTitle,
showMonitored, showMonitored,
showQualityProfile, showQualityProfile,
showCinemaRelease,
showReleaseDate, showReleaseDate,
showSearchAction, showSearchAction,
} = useSelector(selectPosterOptions); } = useSelector(selectPosterOptions);
@ -59,6 +60,8 @@ function MovieIndexPoster(props: MovieIndexPosterProps) {
youTubeTrailerId, youTubeTrailerId,
hasFile, hasFile,
isAvailable, isAvailable,
studio,
added,
inCinemas, inCinemas,
physicalRelease, physicalRelease,
digitalRelease, digitalRelease,
@ -199,7 +202,7 @@ function MovieIndexPoster(props: MovieIndexPosterProps) {
{showMonitored ? ( {showMonitored ? (
<div className={styles.title}> <div className={styles.title}>
{monitored ? translate('monitored') : translate('unmonitored')} {monitored ? translate('Monitored') : translate('Unmonitored')}
</div> </div>
) : null} ) : null}
@ -208,8 +211,11 @@ function MovieIndexPoster(props: MovieIndexPosterProps) {
) : null} ) : null}
<MovieIndexPosterInfo <MovieIndexPosterInfo
studio={studio}
qualityProfile={qualityProfile} qualityProfile={qualityProfile}
added={added}
showQualityProfile={showQualityProfile} showQualityProfile={showQualityProfile}
showCinemaRelease={showCinemaRelease}
showReleaseDate={showReleaseDate} showReleaseDate={showReleaseDate}
showRelativeDates={showRelativeDates} showRelativeDates={showRelativeDates}
shortDateFormat={shortDateFormat} shortDateFormat={shortDateFormat}

@ -20,6 +20,7 @@ interface MovieIndexPosterInfoProps {
sizeOnDisk?: number; sizeOnDisk?: number;
sortKey: string; sortKey: string;
showRelativeDates: boolean; showRelativeDates: boolean;
showCinemaRelease: boolean;
showReleaseDate: boolean; showReleaseDate: boolean;
shortDateFormat: string; shortDateFormat: string;
timeFormat: string; timeFormat: string;
@ -39,6 +40,7 @@ function MovieIndexPosterInfo(props: MovieIndexPosterInfoProps) {
sizeOnDisk, sizeOnDisk,
sortKey, sortKey,
showRelativeDates, showRelativeDates,
showCinemaRelease,
showReleaseDate, showReleaseDate,
shortDateFormat, shortDateFormat,
timeFormat, timeFormat,
@ -70,7 +72,7 @@ function MovieIndexPosterInfo(props: MovieIndexPosterInfoProps) {
); );
} }
if (sortKey === 'inCinemas' && inCinemas && !showReleaseDate) { if (sortKey === 'inCinemas' && inCinemas && showCinemaRelease) {
const inCinemasDate = getRelativeDate( const inCinemasDate = getRelativeDate(
inCinemas, inCinemas,
shortDateFormat, shortDateFormat,
@ -88,7 +90,7 @@ function MovieIndexPosterInfo(props: MovieIndexPosterInfoProps) {
); );
} }
if (sortKey === 'digitalRelease' && digitalRelease && !showReleaseDate) { if (sortKey === 'digitalRelease' && digitalRelease && showReleaseDate) {
const digitalReleaseDate = getRelativeDate( const digitalReleaseDate = getRelativeDate(
digitalRelease, digitalRelease,
shortDateFormat, shortDateFormat,
@ -106,7 +108,7 @@ function MovieIndexPosterInfo(props: MovieIndexPosterInfoProps) {
); );
} }
if (sortKey === 'physicalRelease' && physicalRelease && !showReleaseDate) { if (sortKey === 'physicalRelease' && physicalRelease && showReleaseDate) {
const physicalReleaseDate = getRelativeDate( const physicalReleaseDate = getRelativeDate(
physicalRelease, physicalRelease,
shortDateFormat, shortDateFormat,

Loading…
Cancel
Save