From 7d22696b1f2d9a16cdf26e59dbad1d58f6c9bf45 Mon Sep 17 00:00:00 2001 From: Qstick Date: Wed, 8 Jul 2020 09:30:24 -0400 Subject: [PATCH] New: Show Digital Release on Poster view when Sorted By --- .../Index/Posters/MovieIndexPosterInfo.js | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/frontend/src/Movie/Index/Posters/MovieIndexPosterInfo.js b/frontend/src/Movie/Index/Posters/MovieIndexPosterInfo.js index c04a4b443..ebbde6aed 100644 --- a/frontend/src/Movie/Index/Posters/MovieIndexPosterInfo.js +++ b/frontend/src/Movie/Index/Posters/MovieIndexPosterInfo.js @@ -11,6 +11,7 @@ function MovieIndexPosterInfo(props) { showQualityProfile, added, inCinemas, + digitalRelease, physicalRelease, certification, path, @@ -73,6 +74,24 @@ function MovieIndexPosterInfo(props) { ); } + if (sortKey === 'digitalRelease' && digitalRelease) { + const digitalReleaseDate = getRelativeDate( + digitalRelease, + shortDateFormat, + showRelativeDates, + { + timeFormat, + timeForToday: false + } + ); + + return ( +
+ {`Digital ${digitalReleaseDate}`} +
+ ); + } + if (sortKey === 'physicalRelease' && physicalRelease) { const physicalReleaseDate = getRelativeDate( physicalRelease, @@ -125,6 +144,7 @@ MovieIndexPosterInfo.propTypes = { added: PropTypes.string, inCinemas: PropTypes.string, certification: PropTypes.string, + digitalRelease: PropTypes.string, physicalRelease: PropTypes.string, path: PropTypes.string.isRequired, sizeOnDisk: PropTypes.number,