1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-21 22:05:43 -04:00

Added trailer link to movie links (#255) (#282)

* added YouTubeTrailerId to movie model
* db migration for new column

* added videos to append_to_response for tmdb
* increased height of .series-posters-item
* new handlebar helper to build the trailer url
This commit is contained in:
Vlad Ilies
2017-01-15 22:17:24 +02:00
committed by Tim Turner
parent af478d3799
commit 56a5b6ec89
13 changed files with 82 additions and 6 deletions
@@ -73,7 +73,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
.SetSegment("route", "movie")
.SetSegment("id", TmdbId.ToString())
.SetSegment("secondaryRoute", "")
.AddQueryParam("append_to_response", "alternative_titles,release_dates")
.AddQueryParam("append_to_response", "alternative_titles,release_dates,videos")
.AddQueryParam("country", "US")
.Build();
@@ -149,6 +149,18 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
{
movie.Status = MovieStatusType.Announced;
}
if (resource.videos != null)
{
foreach(Video video in resource.videos.results)
{
if(video.type == "Trailer" && video.site == "YouTube")
{
movie.YouTubeTrailerId = video.key;
break;
}
}
}
return movie;
}