Fixed: Missing Sort Items on Poster View

pull/2/head
Qstick 5 years ago
parent dd52760095
commit 68dec70b34

@ -90,6 +90,24 @@ function MovieIndexSortMenu(props) {
> >
Path Path
</SortMenuItem> </SortMenuItem>
<SortMenuItem
name="sizeOnDisk"
sortKey={sortKey}
sortDirection={sortDirection}
onPress={onSortSelect}
>
Size on Disk
</SortMenuItem>
<SortMenuItem
name="certification"
sortKey={sortKey}
sortDirection={sortDirection}
onPress={onSortSelect}
>
Certification
</SortMenuItem>
</MenuContent> </MenuContent>
</SortMenu> </SortMenu>
); );

@ -10,6 +10,9 @@ function MovieIndexPosterInfo(props) {
qualityProfile, qualityProfile,
showQualityProfile, showQualityProfile,
added, added,
inCinemas,
physicalRelease,
certification,
path, path,
sizeOnDisk, sizeOnDisk,
sortKey, sortKey,
@ -52,6 +55,42 @@ function MovieIndexPosterInfo(props) {
); );
} }
if (sortKey === 'inCinemas' && inCinemas) {
const inCinemasDate = getRelativeDate(
inCinemas,
shortDateFormat,
showRelativeDates,
{
timeFormat,
timeForToday: false
}
);
return (
<div className={styles.info}>
{`In Cinemas ${inCinemasDate}`}
</div>
);
}
if (sortKey === 'physicalRelease' && physicalRelease) {
const physicalReleaseDate = getRelativeDate(
physicalRelease,
shortDateFormat,
showRelativeDates,
{
timeFormat,
timeForToday: false
}
);
return (
<div className={styles.info}>
{`Released ${physicalReleaseDate}`}
</div>
);
}
if (sortKey === 'path') { if (sortKey === 'path') {
return ( return (
<div className={styles.info}> <div className={styles.info}>
@ -68,6 +107,14 @@ function MovieIndexPosterInfo(props) {
); );
} }
if (sortKey === 'certification') {
return (
<div className={styles.info}>
{certification}
</div>
);
}
return null; return null;
} }
@ -76,6 +123,9 @@ MovieIndexPosterInfo.propTypes = {
showQualityProfile: PropTypes.bool.isRequired, showQualityProfile: PropTypes.bool.isRequired,
qualityProfile: PropTypes.object.isRequired, qualityProfile: PropTypes.object.isRequired,
added: PropTypes.string, added: PropTypes.string,
inCinemas: PropTypes.string,
certification: PropTypes.string,
physicalRelease: PropTypes.string,
path: PropTypes.string.isRequired, path: PropTypes.string.isRequired,
sizeOnDisk: PropTypes.number, sizeOnDisk: PropTypes.number,
sortKey: PropTypes.string.isRequired, sortKey: PropTypes.string.isRequired,

Loading…
Cancel
Save