|
|
@ -138,12 +138,23 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
|
|
|
|
movie.SortTitle = Parser.Parser.NormalizeTitle(resource.title);
|
|
|
|
movie.SortTitle = Parser.Parser.NormalizeTitle(resource.title);
|
|
|
|
movie.Overview = resource.overview;
|
|
|
|
movie.Overview = resource.overview;
|
|
|
|
movie.Website = resource.homepage;
|
|
|
|
movie.Website = resource.homepage;
|
|
|
|
|
|
|
|
|
|
|
|
if (resource.release_date.IsNotNullOrWhiteSpace())
|
|
|
|
if (resource.release_date.IsNotNullOrWhiteSpace())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
movie.InCinemas = DateTime.Parse(resource.release_date);
|
|
|
|
movie.InCinemas = DateTime.Parse(resource.release_date);
|
|
|
|
movie.Year = movie.InCinemas.Value.Year;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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.TitleSlug += "-" + movie.TmdbId.ToString();
|
|
|
|
movie.TitleSlug += "-" + movie.TmdbId.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
movie.Images.Add(_configService.GetCoverForURL(resource.poster_path, MediaCoverTypes.Poster));//TODO: Update to load image specs from tmdb page!
|
|
|
|
movie.Images.Add(_configService.GetCoverForURL(resource.poster_path, MediaCoverTypes.Poster));//TODO: Update to load image specs from tmdb page!
|
|
|
|