From 68dec70b347923092f8e6217a415b93853e8d933 Mon Sep 17 00:00:00 2001 From: Qstick Date: Thu, 2 Apr 2020 23:08:19 -0400 Subject: [PATCH] Fixed: Missing Sort Items on Poster View --- .../Movie/Index/Menus/MovieIndexSortMenu.js | 18 +++++++ .../Index/Posters/MovieIndexPosterInfo.js | 50 +++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/frontend/src/Movie/Index/Menus/MovieIndexSortMenu.js b/frontend/src/Movie/Index/Menus/MovieIndexSortMenu.js index 8ffc0880a..d7fb6e039 100644 --- a/frontend/src/Movie/Index/Menus/MovieIndexSortMenu.js +++ b/frontend/src/Movie/Index/Menus/MovieIndexSortMenu.js @@ -90,6 +90,24 @@ function MovieIndexSortMenu(props) { > Path + + + Size on Disk + + + + Certification + ); diff --git a/frontend/src/Movie/Index/Posters/MovieIndexPosterInfo.js b/frontend/src/Movie/Index/Posters/MovieIndexPosterInfo.js index 563061add..c04a4b443 100644 --- a/frontend/src/Movie/Index/Posters/MovieIndexPosterInfo.js +++ b/frontend/src/Movie/Index/Posters/MovieIndexPosterInfo.js @@ -10,6 +10,9 @@ function MovieIndexPosterInfo(props) { qualityProfile, showQualityProfile, added, + inCinemas, + physicalRelease, + certification, path, sizeOnDisk, sortKey, @@ -52,6 +55,42 @@ function MovieIndexPosterInfo(props) { ); } + if (sortKey === 'inCinemas' && inCinemas) { + const inCinemasDate = getRelativeDate( + inCinemas, + shortDateFormat, + showRelativeDates, + { + timeFormat, + timeForToday: false + } + ); + + return ( +
+ {`In Cinemas ${inCinemasDate}`} +
+ ); + } + + if (sortKey === 'physicalRelease' && physicalRelease) { + const physicalReleaseDate = getRelativeDate( + physicalRelease, + shortDateFormat, + showRelativeDates, + { + timeFormat, + timeForToday: false + } + ); + + return ( +
+ {`Released ${physicalReleaseDate}`} +
+ ); + } + if (sortKey === 'path') { return (
@@ -68,6 +107,14 @@ function MovieIndexPosterInfo(props) { ); } + if (sortKey === 'certification') { + return ( +
+ {certification} +
+ ); + } + return null; } @@ -76,6 +123,9 @@ MovieIndexPosterInfo.propTypes = { showQualityProfile: PropTypes.bool.isRequired, qualityProfile: PropTypes.object.isRequired, added: PropTypes.string, + inCinemas: PropTypes.string, + certification: PropTypes.string, + physicalRelease: PropTypes.string, path: PropTypes.string.isRequired, sizeOnDisk: PropTypes.number, sortKey: PropTypes.string.isRequired,