Available date is now displayed.

pull/2/head
Leonardo Galli 8 years ago
parent 55f4a81dee
commit fb7969e046

@ -108,7 +108,17 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
{
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 @@ namespace NzbDrone.Core.Tv
movie.Website = movieInfo.Website;
movie.AlternativeTitles = movieInfo.AlternativeTitles;
movie.Year = movieInfo.Year;
movie.PhysicalRelease = movieInfo.PhysicalRelease;
try
{

@ -134,10 +134,17 @@ Handlebars.registerHelper('inCinemas', function() {
var monthNames = ["January", "February", "March", "April", "May", "June",
"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 year = cinemasDate.getFullYear();
var month = monthNames[cinemasDate.getMonth()];
return "In Cinemas " + month + " " + year;
return "In Cinemas: " + month + " " + year;
});
Handlebars.registerHelper('tvRageUrl', function() {

Loading…
Cancel
Save