mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 03:52:33 +02:00
Fixed: Use TMDB ReleaseDate Year for Year (Match Cinema Date)
This commit is contained in:
parent
3969a396d3
commit
d7fd48ef25
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user