mirror of
https://github.com/Radarr/Radarr
synced 2024-12-26 09:49:00 +00:00
Available date is now displayed.
This commit is contained in:
parent
55f4a81dee
commit
fb7969e046
3 changed files with 20 additions and 2 deletions
|
@ -108,7 +108,17 @@ public Movie GetMovieInfo(int TmdbId)
|
||||||
{
|
{
|
||||||
if (releaseDate.type == 5 || releaseDate.type == 4)
|
if (releaseDate.type == 5 || releaseDate.type == 4)
|
||||||
{
|
{
|
||||||
movie.PhysicalRelease = DateTime.Parse(releaseDate.release_date);
|
if (movie.PhysicalRelease.HasValue)
|
||||||
|
{
|
||||||
|
if (movie.PhysicalRelease.Value.After(DateTime.Parse(releaseDate.release_date)))
|
||||||
|
{
|
||||||
|
movie.PhysicalRelease = DateTime.Parse(releaseDate.release_date); //Use oldest release date available.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
movie.PhysicalRelease = DateTime.Parse(releaseDate.release_date);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,7 @@ private void RefreshMovieInfo(Movie movie)
|
||||||
movie.Website = movieInfo.Website;
|
movie.Website = movieInfo.Website;
|
||||||
movie.AlternativeTitles = movieInfo.AlternativeTitles;
|
movie.AlternativeTitles = movieInfo.AlternativeTitles;
|
||||||
movie.Year = movieInfo.Year;
|
movie.Year = movieInfo.Year;
|
||||||
|
movie.PhysicalRelease = movieInfo.PhysicalRelease;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -134,10 +134,17 @@ Handlebars.registerHelper('inCinemas', function() {
|
||||||
var monthNames = ["January", "February", "March", "April", "May", "June",
|
var monthNames = ["January", "February", "March", "April", "May", "June",
|
||||||
"July", "August", "September", "October", "November", "December"
|
"July", "August", "September", "October", "November", "December"
|
||||||
];
|
];
|
||||||
|
if (this.physicalRelease) {
|
||||||
|
var d = new Date(this.physicalRelease);
|
||||||
|
var day = d.getDate();
|
||||||
|
var month = monthNames[d.getMonth()];
|
||||||
|
var year = d.getFullYear();
|
||||||
|
return "Available: " + day + ". " + month + " " + year;
|
||||||
|
}
|
||||||
var cinemasDate = new Date(this.inCinemas);
|
var cinemasDate = new Date(this.inCinemas);
|
||||||
var year = cinemasDate.getFullYear();
|
var year = cinemasDate.getFullYear();
|
||||||
var month = monthNames[cinemasDate.getMonth()];
|
var month = monthNames[cinemasDate.getMonth()];
|
||||||
return "In Cinemas " + month + " " + year;
|
return "In Cinemas: " + month + " " + year;
|
||||||
});
|
});
|
||||||
|
|
||||||
Handlebars.registerHelper('tvRageUrl', function() {
|
Handlebars.registerHelper('tvRageUrl', function() {
|
||||||
|
|
Loading…
Reference in a new issue