1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Use TMDB ReleaseDate Year for Year (Match Cinema Date)

This commit is contained in:
Qstick 2020-02-24 23:02:39 -05:00
parent 3969a396d3
commit d7fd48ef25

View File

@ -176,17 +176,7 @@ public Tuple<Movie, List<Credit>> GetMovieInfo(int tmdbId, Profile profile, bool
{
movie.InCinemas = DateTime.Parse(resource.release_date);
// get the lowest year in all release date
var lowestYear = new List<int>();
foreach (ReleaseDates releaseDates in resource.release_dates.results)
{
foreach (ReleaseDate releaseDate in releaseDates.release_dates)
{
lowestYear.Add(DateTime.Parse(releaseDate.release_date).Year);
}
}
movie.Year = lowestYear.Min();
movie.Year = movie.InCinemas.Value.Year;
}
movie.TitleSlug += "-" + movie.TmdbId.ToString();