From 79128e6d8519c731ccb49f9d982d9eec1d211eeb Mon Sep 17 00:00:00 2001 From: softworkz Date: Sat, 4 Jun 2016 04:47:30 +0200 Subject: [PATCH 1/2] MovieDbSeasonProvider: Don't fill name from search info --- MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeasonProvider.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeasonProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeasonProvider.cs index 2e51393e3..194af5b99 100644 --- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeasonProvider.cs +++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeasonProvider.cs @@ -58,7 +58,7 @@ namespace MediaBrowser.Providers.TV result.HasMetadata = true; result.Item = new Season(); - result.Item.Name = info.Name; + result.Item.Name = seasonInfo.name; result.Item.IndexNumber = seasonNumber; result.Item.Overview = seasonInfo.overview; From 75840c7065e8b16fc5391811a34a06990d592388 Mon Sep 17 00:00:00 2001 From: softworkz Date: Sat, 4 Jun 2016 06:30:06 +0200 Subject: [PATCH 2/2] MovieDbSeriesProvider and MovieDbEpisodeProvider: Add support for trailers --- .../TV/TheMovieDb/MovieDbEpisodeProvider.cs | 16 +++++++++ .../TV/TheMovieDb/MovieDbProviderBase.cs | 14 +++++++- .../TV/TheMovieDb/MovieDbSeriesProvider.cs | 33 +++++++++++++++++-- 3 files changed, 59 insertions(+), 4 deletions(-) diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs index 9bab3d380..bc9842b73 100644 --- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs @@ -114,6 +114,22 @@ namespace MediaBrowser.Providers.TV item.CommunityRating = (float)response.vote_average; item.VoteCount = response.vote_count; + if (response.videos != null && response.videos.results != null) + { + foreach (var video in response.videos.results) + { + if (video.type.Equals("trailer", System.StringComparison.OrdinalIgnoreCase) + || video.type.Equals("clip", System.StringComparison.OrdinalIgnoreCase)) + { + if (video.site.Equals("youtube", System.StringComparison.OrdinalIgnoreCase)) + { + var videoUrl = string.Format("http://www.youtube.com/watch?v={0}", video.key); + item.AddTrailerUrl(videoUrl, true); + } + } + } + } + result.ResetPeople(); var credits = response.credits; diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbProviderBase.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbProviderBase.cs index 36800202f..a6df245b0 100644 --- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbProviderBase.cs +++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbProviderBase.cs @@ -210,7 +210,19 @@ namespace MediaBrowser.Providers.TV public class Videos { - public List results { get; set; } + public List