mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 20:12:41 +02:00
tidied up to only have getRelativeDate once per item
This commit is contained in:
parent
9e7ea6f55b
commit
913766f9af
@ -136,56 +136,16 @@ class MovieIndexPoster extends Component {
|
||||
if (showReleaseDate) {
|
||||
if (physicalRelease && digitalRelease) {
|
||||
if (physicalRelease < digitalRelease) {
|
||||
releaseDate = getRelativeDate(
|
||||
physicalRelease,
|
||||
shortDateFormat,
|
||||
showRelativeDates,
|
||||
{
|
||||
timeFormat,
|
||||
timeForToday: false
|
||||
}
|
||||
);
|
||||
releaseDate = physicalRelease;
|
||||
} else {
|
||||
getRelativeDate(
|
||||
digitalRelease,
|
||||
shortDateFormat,
|
||||
showRelativeDates,
|
||||
{
|
||||
timeFormat,
|
||||
timeForToday: false
|
||||
}
|
||||
);
|
||||
releaseDate = digitalRelease;
|
||||
}
|
||||
} else if (physicalRelease && !digitalRelease) {
|
||||
releaseDate = getRelativeDate(
|
||||
physicalRelease,
|
||||
shortDateFormat,
|
||||
showRelativeDates,
|
||||
{
|
||||
timeFormat,
|
||||
timeForToday: false
|
||||
}
|
||||
);
|
||||
releaseDate = physicalRelease;
|
||||
} else if (digitalRelease && !physicalRelease) {
|
||||
releaseDate = getRelativeDate(
|
||||
digitalRelease,
|
||||
shortDateFormat,
|
||||
showRelativeDates,
|
||||
{
|
||||
timeFormat,
|
||||
timeForToday: false
|
||||
}
|
||||
);
|
||||
releaseDate = digitalRelease;
|
||||
} else {
|
||||
releaseDate = getRelativeDate(
|
||||
inCinemas,
|
||||
shortDateFormat,
|
||||
showRelativeDates,
|
||||
{
|
||||
timeFormat,
|
||||
timeForToday: false
|
||||
}
|
||||
);
|
||||
releaseDate = inCinemas;
|
||||
}
|
||||
}
|
||||
|
||||
@ -318,7 +278,15 @@ class MovieIndexPoster extends Component {
|
||||
{
|
||||
showReleaseDate &&
|
||||
<div className={styles.title}>
|
||||
{releaseDate}
|
||||
{getRelativeDate(
|
||||
releaseDate,
|
||||
shortDateFormat,
|
||||
showRelativeDates,
|
||||
{
|
||||
timeFormat,
|
||||
timeForToday: false
|
||||
}
|
||||
)}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
@ -871,6 +871,7 @@
|
||||
"ShowQualityProfile": "Show Quality Profile",
|
||||
"ShowQualityProfileHelpText": "Show quality profile under poster",
|
||||
"ShowRatings": "Show Ratings",
|
||||
"ShowReleaseDateHelpText": "Show release date under poster",
|
||||
"ShowSearch": "Show Search",
|
||||
"ShowSearchHelpText": "Show search button on hover",
|
||||
"ShowSizeOnDisk": "Show Size on Disk",
|
||||
|
Loading…
Reference in New Issue
Block a user