diff --git a/src/NzbDrone.Api/Series/MovieResource.cs b/src/NzbDrone.Api/Series/MovieResource.cs index c0cc8d623..d791ba130 100644 --- a/src/NzbDrone.Api/Series/MovieResource.cs +++ b/src/NzbDrone.Api/Series/MovieResource.cs @@ -34,6 +34,7 @@ namespace NzbDrone.Api.Movie public string RemotePoster { get; set; } public int Year { get; set; } public bool HasFile { get; set; } + public string YouTubeTrailerId { get; set; } //View & Edit public string Path { get; set; } @@ -144,7 +145,8 @@ namespace NzbDrone.Api.Movie AddOptions = model.AddOptions, AlternativeTitles = model.AlternativeTitles, Ratings = model.Ratings, - MovieFile = movieFile + MovieFile = movieFile, + YouTubeTrailerId = model.YouTubeTrailerId }; } @@ -191,7 +193,8 @@ namespace NzbDrone.Api.Movie Added = resource.Added, AddOptions = resource.AddOptions, AlternativeTitles = resource.AlternativeTitles, - Ratings = resource.Ratings + Ratings = resource.Ratings, + YouTubeTrailerId = resource.YouTubeTrailerId }; } diff --git a/src/NzbDrone.Core/Datastore/Migration/119_add_youtube_trailer_id_table .cs b/src/NzbDrone.Core/Datastore/Migration/119_add_youtube_trailer_id_table .cs new file mode 100644 index 000000000..e975f3d9c --- /dev/null +++ b/src/NzbDrone.Core/Datastore/Migration/119_add_youtube_trailer_id_table .cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using FluentMigrator; +using NzbDrone.Core.Datastore.Migration.Framework; +using System.Data; + +namespace NzbDrone.Core.Datastore.Migration +{ + [Migration(119)] + public class add_youtube_trailer_id : NzbDroneMigrationBase + { + protected override void MainDbUpgrade() + { + Alter.Table("Movies").AddColumn("YouTubeTrailerId").AsString().Nullable(); + + } + + } +} diff --git a/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/TMDBResources.cs b/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/TMDBResources.cs index c0987e04f..469e72776 100644 --- a/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/TMDBResources.cs +++ b/src/NzbDrone.Core/MetadataSource/SkyHook/Resource/TMDBResources.cs @@ -66,6 +66,7 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource public int vote_count { get; set; } public AlternativeTitles alternative_titles { get; set; } public ReleaseDatesResource release_dates { get; set; } + public VideosResource videos { get; set; } } public class ReleaseDatesResource @@ -130,4 +131,21 @@ namespace NzbDrone.Core.MetadataSource.SkyHook.Resource public string iso_3166_1 { get; set; } public string title { get; set; } } + + public class VideosResource + { + public List