diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 60b1e6eae6..afbe02dd36 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -241,11 +241,13 @@ namespace MediaBrowser.Model.Configuration public bool EnableNewOmdbSupport { get; set; } public string[] RemoteIPFilter { get; set; } + public bool IsRemoteIPFilterBlacklist { get; set; } public int ImageExtractionTimeoutMs { get; set; } public PathSubstitution[] PathSubstitutions { get; set; } + public bool EnableSimpleArtistDetection { get; set; } public string[] UninstalledPlugins { get; set; } @@ -314,24 +316,24 @@ namespace MediaBrowser.Model.Configuration new MetadataOptions { ItemType = "MusicVideo", - DisabledMetadataFetchers = new [] { "The Open Movie Database" }, - DisabledImageFetchers = new [] { "The Open Movie Database" } + DisabledMetadataFetchers = new[] { "The Open Movie Database" }, + DisabledImageFetchers = new[] { "The Open Movie Database" } }, new MetadataOptions { ItemType = "Series", - DisabledMetadataFetchers = new [] { "TheMovieDb" }, - DisabledImageFetchers = new [] { "TheMovieDb" } + DisabledMetadataFetchers = new[] { "TheMovieDb" }, + DisabledImageFetchers = new[] { "TheMovieDb" } }, new MetadataOptions { ItemType = "MusicAlbum", - DisabledMetadataFetchers = new [] { "TheAudioDB" } + DisabledMetadataFetchers = new[] { "TheAudioDB" } }, new MetadataOptions { ItemType = "MusicArtist", - DisabledMetadataFetchers = new [] { "TheAudioDB" } + DisabledMetadataFetchers = new[] { "TheAudioDB" } }, new MetadataOptions { @@ -340,13 +342,13 @@ namespace MediaBrowser.Model.Configuration new MetadataOptions { ItemType = "Season", - DisabledMetadataFetchers = new [] { "TheMovieDb" }, + DisabledMetadataFetchers = new[] { "TheMovieDb" }, }, new MetadataOptions { ItemType = "Episode", - DisabledMetadataFetchers = new [] { "The Open Movie Database", "TheMovieDb" }, - DisabledImageFetchers = new [] { "The Open Movie Database", "TheMovieDb" } + DisabledMetadataFetchers = new[] { "The Open Movie Database", "TheMovieDb" }, + DisabledImageFetchers = new[] { "The Open Movie Database", "TheMovieDb" } } }; } @@ -355,6 +357,7 @@ namespace MediaBrowser.Model.Configuration public class PathSubstitution { public string From { get; set; } + public string To { get; set; } } } diff --git a/MediaBrowser.Providers/Plugins/Omdb/Configuration/PluginConfiguration.cs b/MediaBrowser.Providers/Plugins/Omdb/Configuration/PluginConfiguration.cs new file mode 100644 index 0000000000..a9eecdd9ee --- /dev/null +++ b/MediaBrowser.Providers/Plugins/Omdb/Configuration/PluginConfiguration.cs @@ -0,0 +1,9 @@ +using MediaBrowser.Model.Plugins; + +namespace MediaBrowser.Providers.Plugins.Omdb +{ + public class PluginConfiguration : BasePluginConfiguration + { + public bool CastAndCrew { get; set; } + } +} diff --git a/MediaBrowser.Providers/Plugins/Omdb/Configuration/config.html b/MediaBrowser.Providers/Plugins/Omdb/Configuration/config.html new file mode 100644 index 0000000000..8b117ec8d2 --- /dev/null +++ b/MediaBrowser.Providers/Plugins/Omdb/Configuration/config.html @@ -0,0 +1,49 @@ + + + + OMDb + + +
+
+
+
+ +
+
+ +
+
+
+
+ +
+ + diff --git a/MediaBrowser.Providers/Plugins/Omdb/OmdbImageProvider.cs b/MediaBrowser.Providers/Plugins/Omdb/OmdbImageProvider.cs index a450c2a6db..3cf4c3d503 100644 --- a/MediaBrowser.Providers/Plugins/Omdb/OmdbImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/Omdb/OmdbImageProvider.cs @@ -92,6 +92,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb { return item is Movie || item is Trailer || item is Episode; } + // After other internet providers, because they're better // But before fallback providers like screengrab public int Order => 90; diff --git a/MediaBrowser.Providers/Plugins/Omdb/OmdbItemProvider.cs b/MediaBrowser.Providers/Plugins/Omdb/OmdbItemProvider.cs index 64a75955a2..35a840f00b 100644 --- a/MediaBrowser.Providers/Plugins/Omdb/OmdbItemProvider.cs +++ b/MediaBrowser.Providers/Plugins/Omdb/OmdbItemProvider.cs @@ -103,6 +103,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb { urlQuery += "&t=" + WebUtility.UrlEncode(name); } + urlQuery += "&type=" + type; } else @@ -117,6 +118,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb { urlQuery += string.Format(CultureInfo.InvariantCulture, "&Episode={0}", searchInfo.IndexNumber); } + if (searchInfo.ParentIndexNumber.HasValue) { urlQuery += string.Format(CultureInfo.InvariantCulture, "&Season={0}", searchInfo.ParentIndexNumber); diff --git a/MediaBrowser.Providers/Plugins/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Plugins/Omdb/OmdbProvider.cs index fbdd293edf..dcc003dca9 100644 --- a/MediaBrowser.Providers/Plugins/Omdb/OmdbProvider.cs +++ b/MediaBrowser.Providers/Plugins/Omdb/OmdbProvider.cs @@ -87,10 +87,10 @@ namespace MediaBrowser.Providers.Plugins.Omdb item.CommunityRating = imdbRating; } - //if (!string.IsNullOrEmpty(result.Website)) - //{ - // item.HomePageUrl = result.Website; - //} + if (!string.IsNullOrEmpty(result.Website)) + { + item.HomePageUrl = result.Website; + } if (!string.IsNullOrWhiteSpace(result.imdbID)) { @@ -121,7 +121,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb if (!string.IsNullOrWhiteSpace(episodeImdbId)) { - foreach (var episode in (seasonResult.Episodes ?? new RootObject[] { })) + foreach (var episode in seasonResult.Episodes) { if (string.Equals(episodeImdbId, episode.imdbID, StringComparison.OrdinalIgnoreCase)) { @@ -134,7 +134,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb // finally, search by numbers if (result == null) { - foreach (var episode in (seasonResult.Episodes ?? new RootObject[] { })) + foreach (var episode in seasonResult.Episodes) { if (episode.Episode == episodeNumber) { @@ -188,10 +188,10 @@ namespace MediaBrowser.Providers.Plugins.Omdb item.CommunityRating = imdbRating; } - //if (!string.IsNullOrEmpty(result.Website)) - //{ - // item.HomePageUrl = result.Website; - //} + if (!string.IsNullOrEmpty(result.Website)) + { + item.HomePageUrl = result.Website; + } if (!string.IsNullOrWhiteSpace(result.imdbID)) { @@ -263,6 +263,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb { return url; } + return url + "&" + query; } @@ -386,7 +387,7 @@ namespace MediaBrowser.Providers.Plugins.Omdb var isConfiguredForEnglish = IsConfiguredForEnglish(item) || _configurationManager.Configuration.EnableNewOmdbSupport; - // Grab series genres because imdb data is better than tvdb. Leave movies alone + // Grab series genres because IMDb data is better than TVDB. Leave movies alone // But only do it if english is the preferred language because this data will not be localized if (isConfiguredForEnglish && !string.IsNullOrWhiteSpace(result.Genre)) { @@ -407,45 +408,50 @@ namespace MediaBrowser.Providers.Plugins.Omdb item.Overview = result.Plot; } - //if (!string.IsNullOrWhiteSpace(result.Director)) - //{ - // var person = new PersonInfo - // { - // Name = result.Director.Trim(), - // Type = PersonType.Director - // }; - - // itemResult.AddPerson(person); - //} - - //if (!string.IsNullOrWhiteSpace(result.Writer)) - //{ - // var person = new PersonInfo - // { - // Name = result.Director.Trim(), - // Type = PersonType.Writer - // }; - - // itemResult.AddPerson(person); - //} - - //if (!string.IsNullOrWhiteSpace(result.Actors)) - //{ - // var actorList = result.Actors.Split(','); - // foreach (var actor in actorList) - // { - // if (!string.IsNullOrWhiteSpace(actor)) - // { - // var person = new PersonInfo - // { - // Name = actor.Trim(), - // Type = PersonType.Actor - // }; - - // itemResult.AddPerson(person); - // } - // } - //} + if (!Plugin.Instance.Configuration.CastAndCrew) + { + return; + } + + if (!string.IsNullOrWhiteSpace(result.Director)) + { + var person = new PersonInfo + { + Name = result.Director.Trim(), + Type = PersonType.Director + }; + + itemResult.AddPerson(person); + } + + if (!string.IsNullOrWhiteSpace(result.Writer)) + { + var person = new PersonInfo + { + Name = result.Director.Trim(), + Type = PersonType.Writer + }; + + itemResult.AddPerson(person); + } + + if (!string.IsNullOrWhiteSpace(result.Actors)) + { + var actorList = result.Actors.Split(','); + foreach (var actor in actorList) + { + if (!string.IsNullOrWhiteSpace(actor)) + { + var person = new PersonInfo + { + Name = actor.Trim(), + Type = PersonType.Actor + }; + + itemResult.AddPerson(person); + } + } + } } private bool IsConfiguredForEnglish(BaseItem item) @@ -459,40 +465,70 @@ namespace MediaBrowser.Providers.Plugins.Omdb internal class SeasonRootObject { public string Title { get; set; } + public string seriesID { get; set; } + public int Season { get; set; } + public int? totalSeasons { get; set; } + public RootObject[] Episodes { get; set; } + public string Response { get; set; } } internal class RootObject { public string Title { get; set; } + public string Year { get; set; } + public string Rated { get; set; } + public string Released { get; set; } + public string Runtime { get; set; } + public string Genre { get; set; } + public string Director { get; set; } + public string Writer { get; set; } + public string Actors { get; set; } + public string Plot { get; set; } + public string Language { get; set; } + public string Country { get; set; } + public string Awards { get; set; } + public string Poster { get; set; } + public List Ratings { get; set; } + public string Metascore { get; set; } + public string imdbRating { get; set; } + public string imdbVotes { get; set; } + public string imdbID { get; set; } + public string Type { get; set; } + public string DVD { get; set; } + public string BoxOffice { get; set; } + public string Production { get; set; } + public string Website { get; set; } + public string Response { get; set; } + public int Episode { get; set; } public float? GetRottenTomatoScore() @@ -509,12 +545,15 @@ namespace MediaBrowser.Providers.Plugins.Omdb } } } + return null; } } + public class OmdbRating { public string Source { get; set; } + public string Value { get; set; } } } diff --git a/MediaBrowser.Providers/Plugins/Omdb/Plugin.cs b/MediaBrowser.Providers/Plugins/Omdb/Plugin.cs new file mode 100644 index 0000000000..6ce2333e00 --- /dev/null +++ b/MediaBrowser.Providers/Plugins/Omdb/Plugin.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Plugins; +using MediaBrowser.Model.Plugins; +using MediaBrowser.Model.Serialization; + +namespace MediaBrowser.Providers.Plugins.Omdb +{ + public class Plugin : BasePlugin, IHasWebPages + { + public static Plugin Instance { get; private set; } + + public override Guid Id => new Guid("a628c0da-fac5-4c7e-9d1a-7134223f14c8"); + + public override string Name => "OMDb"; + + public override string Description => "Get metadata for movies and other video content from OMDb."; + + public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer) + : base(applicationPaths, xmlSerializer) + { + Instance = this; + } + + public IEnumerable GetPages() + { + yield return new PluginPageInfo + { + Name = Name, + EmbeddedResourcePath = GetType().Namespace + ".Configuration.config.html" + }; + } + } +} diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/Configuration/PluginConfiguration.cs b/MediaBrowser.Providers/Plugins/TheTvdb/Configuration/PluginConfiguration.cs new file mode 100644 index 0000000000..0a73634dc8 --- /dev/null +++ b/MediaBrowser.Providers/Plugins/TheTvdb/Configuration/PluginConfiguration.cs @@ -0,0 +1,8 @@ +using MediaBrowser.Model.Plugins; + +namespace MediaBrowser.Providers.Plugins.TheTvdb +{ + public class PluginConfiguration : BasePluginConfiguration + { + } +} diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/Plugin.cs b/MediaBrowser.Providers/Plugins/TheTvdb/Plugin.cs new file mode 100644 index 0000000000..2e6f548cac --- /dev/null +++ b/MediaBrowser.Providers/Plugins/TheTvdb/Plugin.cs @@ -0,0 +1,24 @@ +using System; +using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Plugins; +using MediaBrowser.Model.Serialization; + +namespace MediaBrowser.Providers.Plugins.TheTvdb +{ + public class Plugin : BasePlugin + { + public static Plugin Instance { get; private set; } + + public override Guid Id => new Guid("a677c0da-fac5-4cde-941a-7134223f14c8"); + + public override string Name => "TheTVDB"; + + public override string Description => "Get metadata for movies and other video content from TheTVDB."; + + public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer) + : base(applicationPaths, xmlSerializer) + { + Instance = this; + } + } +} diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs index b73834155c..24d60deb91 100644 --- a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs +++ b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbClientManager.cs @@ -120,6 +120,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb var cacheKey = GenerateKey("series", zap2ItId, language); return TryGetValue(cacheKey, language, () => TvDbClient.Search.SearchSeriesByZap2ItIdAsync(zap2ItId, cancellationToken)); } + public Task> GetActorsAsync( int tvdbId, string language, @@ -190,7 +191,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb episodeQuery.AbsoluteNumber = searchInfo.IndexNumber.Value; break; default: - //aired order + // aired order episodeQuery.AiredEpisode = searchInfo.IndexNumber.Value; episodeQuery.AiredSeason = searchInfo.ParentIndexNumber.Value; break; diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs index 1f8b82ecd6..d0729a38b2 100644 --- a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs +++ b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbEpisodeProvider.cs @@ -14,9 +14,8 @@ using TvDbSharper.Dto; namespace MediaBrowser.Providers.Plugins.TheTvdb { - /// - /// Class RemoteEpisodeProvider + /// Class RemoteEpisodeProvider. /// public class TvdbEpisodeProvider : IRemoteMetadataProvider, IHasOrder { @@ -139,7 +138,6 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb Name = episode.EpisodeName, Overview = episode.Overview, CommunityRating = (float?)episode.SiteRating, - } }; result.ResetPeople(); diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbPersonImageProvider.cs b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbPersonImageProvider.cs index 961cb59707..a9aba98f3f 100644 --- a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbPersonImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbPersonImageProvider.cs @@ -57,7 +57,6 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb { EnableImages = false } - }).Cast() .Where(i => TvdbSeriesProvider.IsValidSeries(i.ProviderIds)) .ToList(); diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeasonImageProvider.cs b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeasonImageProvider.cs index cd22514b4a..dad4468a63 100644 --- a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeasonImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeasonImageProvider.cs @@ -55,7 +55,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb if (series == null || !season.IndexNumber.HasValue || !TvdbSeriesProvider.IsValidSeries(series.ProviderIds)) { - return new RemoteImageInfo[] { }; + return Array.Empty(); } var tvdbId = Convert.ToInt32(series.GetProviderId(MetadataProviders.Tvdb)); @@ -113,8 +113,8 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb imageInfo.Type = TvdbUtils.GetImageTypeFromKeyType(image.KeyType); list.Add(imageInfo); } - var isLanguageEn = string.Equals(preferredLanguage, "en", StringComparison.OrdinalIgnoreCase); + var isLanguageEn = string.Equals(preferredLanguage, "en", StringComparison.OrdinalIgnoreCase); return list.OrderByDescending(i => { if (string.Equals(preferredLanguage, i.Language, StringComparison.OrdinalIgnoreCase)) diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesImageProvider.cs b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesImageProvider.cs index 3fd98b8284..9b9828ab78 100644 --- a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesImageProvider.cs @@ -79,6 +79,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb tvdbId); } } + return remoteImages; } @@ -110,8 +111,8 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb imageInfo.Type = TvdbUtils.GetImageTypeFromKeyType(image.KeyType); list.Add(imageInfo); } - var isLanguageEn = string.Equals(preferredLanguage, "en", StringComparison.OrdinalIgnoreCase); + var isLanguageEn = string.Equals(preferredLanguage, "en", StringComparison.OrdinalIgnoreCase); return list.OrderByDescending(i => { if (string.Equals(preferredLanguage, i.Language, StringComparison.OrdinalIgnoreCase)) diff --git a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesProvider.cs b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesProvider.cs index 35152610a2..d26b1b4fe9 100644 --- a/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesProvider.cs +++ b/MediaBrowser.Providers/Plugins/TheTvdb/TvdbSeriesProvider.cs @@ -22,6 +22,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb public class TvdbSeriesProvider : IRemoteMetadataProvider, IHasOrder { internal static TvdbSeriesProvider Current { get; private set; } + private readonly IHttpClient _httpClient; private readonly ILogger _logger; private readonly ILibraryManager _libraryManager; @@ -145,7 +146,6 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb private async Task GetSeriesByRemoteId(string id, string idType, string language, CancellationToken cancellationToken) { - TvDbResponse result = null; try @@ -249,6 +249,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb ImageUrl = TvdbUtils.BannerUrl + seriesSearchResult.Banner }; + try { var seriesSesult = @@ -274,11 +275,12 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb } /// - /// The remove + /// The remove. /// const string remove = "\"'!`?"; + /// - /// The spacers + /// The spacers. /// const string spacers = "/,.:;\\(){}[]+-_=–*"; // (there are two types of dashes, short and long) @@ -315,8 +317,8 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb sb.Append(c); } } - sb.Replace(", the", string.Empty).Replace("the ", " ").Replace(" the ", " "); + sb.Replace(", the", string.Empty).Replace("the ", " ").Replace(" the ", " "); return Regex.Replace(sb.ToString().Trim(), @"\s+", " "); } diff --git a/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetExternalId.cs similarity index 92% rename from MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs rename to MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetExternalId.cs index 187295e1e4..a260406da8 100644 --- a/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetExternalId.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetExternalId.cs @@ -3,7 +3,7 @@ using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -namespace MediaBrowser.Providers.Tmdb.BoxSets +namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets { public class TmdbBoxSetExternalId : IExternalId { diff --git a/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs similarity index 95% rename from MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs index 0bdf2bce1e..c47c8d4e91 100644 --- a/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetImageProvider.cs @@ -10,11 +10,11 @@ using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Providers; -using MediaBrowser.Providers.Tmdb.Models.Collections; -using MediaBrowser.Providers.Tmdb.Models.General; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.Collections; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; -namespace MediaBrowser.Providers.Tmdb.BoxSets +namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets { public class TmdbBoxSetImageProvider : IRemoteImageProvider, IHasOrder { @@ -105,6 +105,7 @@ namespace MediaBrowser.Providers.Tmdb.BoxSets { return 3; } + if (!isLanguageEn) { if (string.Equals("en", i.Language, StringComparison.OrdinalIgnoreCase)) @@ -112,10 +113,12 @@ namespace MediaBrowser.Providers.Tmdb.BoxSets return 2; } } + if (string.IsNullOrEmpty(i.Language)) { return isLanguageEn ? 3 : 2; } + return 0; }) .ThenByDescending(i => i.CommunityRating ?? 0) diff --git a/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetProvider.cs similarity index 97% rename from MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetProvider.cs index e17f5efdf5..0304236119 100644 --- a/MediaBrowser.Providers/Tmdb/BoxSets/TmdbBoxSetProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/BoxSets/TmdbBoxSetProvider.cs @@ -16,12 +16,12 @@ using MediaBrowser.Model.Globalization; using MediaBrowser.Model.IO; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.Collections; -using MediaBrowser.Providers.Tmdb.Models.General; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.Collections; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Providers.Tmdb.BoxSets +namespace MediaBrowser.Providers.Plugins.Tmdb.BoxSets { public class TmdbBoxSetProvider : IRemoteMetadataProvider { @@ -78,9 +78,7 @@ namespace MediaBrowser.Providers.Tmdb.BoxSets var result = new RemoteSearchResult { Name = info.Name, - SearchProviderName = Name, - ImageUrl = images.Count == 0 ? null : (tmdbImageUrl + images[0].File_Path) }; @@ -191,7 +189,6 @@ namespace MediaBrowser.Providers.Tmdb.BoxSets Url = url, CancellationToken = cancellationToken, AcceptHeader = TmdbUtils.AcceptHeader - }).ConfigureAwait(false)) { using (var json = response.Content) @@ -219,7 +216,6 @@ namespace MediaBrowser.Providers.Tmdb.BoxSets Url = url, CancellationToken = cancellationToken, AcceptHeader = TmdbUtils.AcceptHeader - }).ConfigureAwait(false)) { using (var json = response.Content) @@ -229,6 +225,7 @@ namespace MediaBrowser.Providers.Tmdb.BoxSets } } } + return mainResult; } diff --git a/MediaBrowser.Providers/Tmdb/Models/Collections/CollectionImages.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Collections/CollectionImages.cs similarity index 60% rename from MediaBrowser.Providers/Tmdb/Models/Collections/CollectionImages.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Collections/CollectionImages.cs index 18f26c3977..2410ca16b5 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Collections/CollectionImages.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Collections/CollectionImages.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb.Models.Collections +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Collections { public class CollectionImages { diff --git a/MediaBrowser.Providers/Tmdb/Models/Collections/CollectionResult.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Collections/CollectionResult.cs similarity index 86% rename from MediaBrowser.Providers/Tmdb/Models/Collections/CollectionResult.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Collections/CollectionResult.cs index 53d2599f84..3437552df7 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Collections/CollectionResult.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Collections/CollectionResult.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace MediaBrowser.Providers.Tmdb.Models.Collections +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Collections { public class CollectionResult { diff --git a/MediaBrowser.Providers/Tmdb/Models/Collections/Part.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Collections/Part.cs similarity index 80% rename from MediaBrowser.Providers/Tmdb/Models/Collections/Part.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Collections/Part.cs index ff19291c74..462fdab534 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Collections/Part.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Collections/Part.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.Collections +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Collections { public class Part { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Backdrop.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Backdrop.cs similarity index 85% rename from MediaBrowser.Providers/Tmdb/Models/General/Backdrop.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/Backdrop.cs index db4cd66816..35e3e21126 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/Backdrop.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Backdrop.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Backdrop { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Crew.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Crew.cs similarity index 82% rename from MediaBrowser.Providers/Tmdb/Models/General/Crew.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/Crew.cs index 47b9854030..6a5e74ddbe 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/Crew.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Crew.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Crew { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/ExternalIds.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/ExternalIds.cs similarity index 81% rename from MediaBrowser.Providers/Tmdb/Models/General/ExternalIds.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/ExternalIds.cs index 37e37b0bed..a083f6e9c9 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/ExternalIds.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/ExternalIds.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class ExternalIds { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Genre.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Genre.cs similarity index 65% rename from MediaBrowser.Providers/Tmdb/Models/General/Genre.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/Genre.cs index 9a6686d50d..7f1a394c36 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/Genre.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Genre.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Genre { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Images.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Images.cs similarity index 74% rename from MediaBrowser.Providers/Tmdb/Models/General/Images.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/Images.cs index f1c99537d1..166f9b7408 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/Images.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Images.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Images { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Keyword.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Keyword.cs similarity index 65% rename from MediaBrowser.Providers/Tmdb/Models/General/Keyword.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/Keyword.cs index 4e30113497..72f417be5d 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/Keyword.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Keyword.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Keyword { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Keywords.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Keywords.cs similarity index 67% rename from MediaBrowser.Providers/Tmdb/Models/General/Keywords.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/Keywords.cs index 1950a51b3f..ec2d7a0354 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/Keywords.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Keywords.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Keywords { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Poster.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Poster.cs similarity index 85% rename from MediaBrowser.Providers/Tmdb/Models/General/Poster.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/Poster.cs index 33401b15dc..0cf04a6ce1 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/Poster.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Poster.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Poster { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Profile.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Profile.cs similarity index 81% rename from MediaBrowser.Providers/Tmdb/Models/General/Profile.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/Profile.cs index f87d14850c..b45cfc30f2 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/Profile.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Profile.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Profile { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Still.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Still.cs similarity index 86% rename from MediaBrowser.Providers/Tmdb/Models/General/Still.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/Still.cs index 15ff4a0991..9fc82cfee7 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/Still.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Still.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Still { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/StillImages.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/StillImages.cs similarity index 67% rename from MediaBrowser.Providers/Tmdb/Models/General/StillImages.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/StillImages.cs index 266965c47e..23af4b697a 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/StillImages.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/StillImages.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class StillImages { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Video.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Video.cs similarity index 86% rename from MediaBrowser.Providers/Tmdb/Models/General/Video.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/Video.cs index fb69e77674..19bfd62f61 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/Video.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Video.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Video { diff --git a/MediaBrowser.Providers/Tmdb/Models/General/Videos.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Videos.cs similarity index 67% rename from MediaBrowser.Providers/Tmdb/Models/General/Videos.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/General/Videos.cs index 26812780da..26e839de74 100644 --- a/MediaBrowser.Providers/Tmdb/Models/General/Videos.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/General/Videos.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace MediaBrowser.Providers.Tmdb.Models.General +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General { public class Videos { diff --git a/MediaBrowser.Providers/Tmdb/Models/Movies/BelongsToCollection.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/BelongsToCollection.cs similarity index 79% rename from MediaBrowser.Providers/Tmdb/Models/Movies/BelongsToCollection.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/BelongsToCollection.cs index ac673df619..aaca57f052 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Movies/BelongsToCollection.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/BelongsToCollection.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies { public class BelongsToCollection { diff --git a/MediaBrowser.Providers/Tmdb/Models/Movies/Cast.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Cast.cs similarity index 82% rename from MediaBrowser.Providers/Tmdb/Models/Movies/Cast.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Cast.cs index 44af9e5681..d70f218aa7 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Movies/Cast.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Cast.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies { public class Cast { diff --git a/MediaBrowser.Providers/Tmdb/Models/Movies/Casts.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Casts.cs similarity index 58% rename from MediaBrowser.Providers/Tmdb/Models/Movies/Casts.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Casts.cs index 7b5094fa3e..c41699bc77 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Movies/Casts.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Casts.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb.Models.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies { public class Casts { diff --git a/MediaBrowser.Providers/Tmdb/Models/Movies/Country.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Country.cs similarity index 77% rename from MediaBrowser.Providers/Tmdb/Models/Movies/Country.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Country.cs index 6f843adddb..71d1f7c242 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Movies/Country.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Country.cs @@ -1,6 +1,6 @@ using System; -namespace MediaBrowser.Providers.Tmdb.Models.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies { public class Country { diff --git a/MediaBrowser.Providers/Tmdb/Models/Movies/MovieResult.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/MovieResult.cs similarity index 93% rename from MediaBrowser.Providers/Tmdb/Models/Movies/MovieResult.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/MovieResult.cs index 1b262946fb..2a9b9779af 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Movies/MovieResult.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/MovieResult.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb.Models.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies { public class MovieResult { diff --git a/MediaBrowser.Providers/Tmdb/Models/Movies/ProductionCompany.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/ProductionCompany.cs similarity index 68% rename from MediaBrowser.Providers/Tmdb/Models/Movies/ProductionCompany.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/ProductionCompany.cs index c3382f3057..11158ade5d 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Movies/ProductionCompany.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/ProductionCompany.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies { public class ProductionCompany { diff --git a/MediaBrowser.Providers/Tmdb/Models/Movies/ProductionCountry.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/ProductionCountry.cs similarity index 69% rename from MediaBrowser.Providers/Tmdb/Models/Movies/ProductionCountry.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/ProductionCountry.cs index 78112c915c..43d00fe7a2 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Movies/ProductionCountry.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/ProductionCountry.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies { public class ProductionCountry { diff --git a/MediaBrowser.Providers/Tmdb/Models/Movies/Releases.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Releases.cs similarity index 68% rename from MediaBrowser.Providers/Tmdb/Models/Movies/Releases.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Releases.cs index c44f31e462..d35111dc49 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Movies/Releases.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Releases.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace MediaBrowser.Providers.Tmdb.Models.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies { public class Releases { diff --git a/MediaBrowser.Providers/Tmdb/Models/Movies/SpokenLanguage.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/SpokenLanguage.cs similarity index 69% rename from MediaBrowser.Providers/Tmdb/Models/Movies/SpokenLanguage.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/SpokenLanguage.cs index 4bc5cfa483..41defa9d08 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Movies/SpokenLanguage.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/SpokenLanguage.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies { public class SpokenLanguage { diff --git a/MediaBrowser.Providers/Tmdb/Models/Movies/Trailers.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Trailers.cs similarity index 68% rename from MediaBrowser.Providers/Tmdb/Models/Movies/Trailers.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Trailers.cs index 4bfa02f062..bdc40b483e 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Movies/Trailers.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Trailers.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace MediaBrowser.Providers.Tmdb.Models.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies { public class Trailers { diff --git a/MediaBrowser.Providers/Tmdb/Models/Movies/Youtube.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Youtube.cs similarity index 73% rename from MediaBrowser.Providers/Tmdb/Models/Movies/Youtube.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Youtube.cs index 069572824c..6be4ef5b53 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Movies/Youtube.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Movies/Youtube.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies { public class Youtube { diff --git a/MediaBrowser.Providers/Tmdb/Models/People/PersonImages.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/People/PersonImages.cs similarity index 52% rename from MediaBrowser.Providers/Tmdb/Models/People/PersonImages.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/People/PersonImages.cs index 113f410b23..59423c7bc6 100644 --- a/MediaBrowser.Providers/Tmdb/Models/People/PersonImages.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/People/PersonImages.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb.Models.People +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.People { public class PersonImages { diff --git a/MediaBrowser.Providers/Tmdb/Models/People/PersonResult.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/People/PersonResult.cs similarity index 86% rename from MediaBrowser.Providers/Tmdb/Models/People/PersonResult.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/People/PersonResult.cs index 6e997050fe..50c47eefd0 100644 --- a/MediaBrowser.Providers/Tmdb/Models/People/PersonResult.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/People/PersonResult.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb.Models.People +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.People { public class PersonResult { diff --git a/MediaBrowser.Providers/Tmdb/Models/Search/ExternalIdLookupResult.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Search/ExternalIdLookupResult.cs similarity index 70% rename from MediaBrowser.Providers/Tmdb/Models/Search/ExternalIdLookupResult.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Search/ExternalIdLookupResult.cs index d19f4e8cbd..62b12aa97d 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Search/ExternalIdLookupResult.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Search/ExternalIdLookupResult.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace MediaBrowser.Providers.Tmdb.Models.Search +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Search { public class ExternalIdLookupResult { diff --git a/MediaBrowser.Providers/Tmdb/Models/Search/MovieResult.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Search/MovieResult.cs similarity index 97% rename from MediaBrowser.Providers/Tmdb/Models/Search/MovieResult.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Search/MovieResult.cs index 245162728b..51c26a61c5 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Search/MovieResult.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Search/MovieResult.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.Search +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Search { public class MovieResult { diff --git a/MediaBrowser.Providers/Tmdb/Models/Search/PersonSearchResult.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Search/PersonSearchResult.cs similarity index 93% rename from MediaBrowser.Providers/Tmdb/Models/Search/PersonSearchResult.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Search/PersonSearchResult.cs index 93916068f4..c3ad7253a2 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Search/PersonSearchResult.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Search/PersonSearchResult.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.Search +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Search { public class PersonSearchResult { diff --git a/MediaBrowser.Providers/Tmdb/Models/Search/TmdbSearchResult.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Search/TmdbSearchResult.cs similarity index 92% rename from MediaBrowser.Providers/Tmdb/Models/Search/TmdbSearchResult.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Search/TmdbSearchResult.cs index a9f888e759..7a33acbc76 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Search/TmdbSearchResult.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Search/TmdbSearchResult.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace MediaBrowser.Providers.Tmdb.Models.Search +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Search { public class TmdbSearchResult { diff --git a/MediaBrowser.Providers/Tmdb/Models/Search/TvResult.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/Search/TvResult.cs similarity index 88% rename from MediaBrowser.Providers/Tmdb/Models/Search/TvResult.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/Search/TvResult.cs index ed140bedd0..b7fbd294c2 100644 --- a/MediaBrowser.Providers/Tmdb/Models/Search/TvResult.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/Search/TvResult.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.Search +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Search { public class TvResult { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/Cast.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Cast.cs similarity index 84% rename from MediaBrowser.Providers/Tmdb/Models/TV/Cast.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Cast.cs index c659df9ac8..9c770545c7 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/Cast.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Cast.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class Cast { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/ContentRating.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/ContentRating.cs similarity index 70% rename from MediaBrowser.Providers/Tmdb/Models/TV/ContentRating.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/ContentRating.cs index 3177cd71b0..bccb234e7d 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/ContentRating.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/ContentRating.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class ContentRating { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/ContentRatings.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/ContentRatings.cs similarity index 71% rename from MediaBrowser.Providers/Tmdb/Models/TV/ContentRatings.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/ContentRatings.cs index 883e605c96..360c20c66c 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/ContentRatings.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/ContentRatings.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class ContentRatings { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/CreatedBy.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/CreatedBy.cs similarity index 75% rename from MediaBrowser.Providers/Tmdb/Models/TV/CreatedBy.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/CreatedBy.cs index 21588d8977..35e8eaecb8 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/CreatedBy.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/CreatedBy.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class CreatedBy { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/Credits.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Credits.cs similarity index 59% rename from MediaBrowser.Providers/Tmdb/Models/TV/Credits.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Credits.cs index b62b5f605c..ebf412c2df 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/Credits.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Credits.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class Credits { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/Episode.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Episode.cs similarity index 87% rename from MediaBrowser.Providers/Tmdb/Models/TV/Episode.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Episode.cs index ab11a6cd2f..8203632b7c 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/Episode.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Episode.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class Episode { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/EpisodeCredits.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/EpisodeCredits.cs similarity index 66% rename from MediaBrowser.Providers/Tmdb/Models/TV/EpisodeCredits.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/EpisodeCredits.cs index 1c86be0f41..f89859f85b 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/EpisodeCredits.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/EpisodeCredits.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class EpisodeCredits { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/EpisodeResult.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/EpisodeResult.cs similarity index 86% rename from MediaBrowser.Providers/Tmdb/Models/TV/EpisodeResult.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/EpisodeResult.cs index 0513ce7e25..e25b65d70a 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/EpisodeResult.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/EpisodeResult.cs @@ -1,7 +1,7 @@ using System; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class EpisodeResult { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/GuestStar.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/GuestStar.cs similarity index 84% rename from MediaBrowser.Providers/Tmdb/Models/TV/GuestStar.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/GuestStar.cs index 2dfe7a8625..260f3f610f 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/GuestStar.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/GuestStar.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class GuestStar { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/Network.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Network.cs similarity index 67% rename from MediaBrowser.Providers/Tmdb/Models/TV/Network.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Network.cs index f982682d12..5ed3108276 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/Network.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Network.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class Network { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/Season.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Season.cs similarity index 82% rename from MediaBrowser.Providers/Tmdb/Models/TV/Season.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Season.cs index 976e3c97e2..fddf950ee8 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/Season.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/Season.cs @@ -1,4 +1,4 @@ -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class Season { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/SeasonImages.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/SeasonImages.cs similarity index 53% rename from MediaBrowser.Providers/Tmdb/Models/TV/SeasonImages.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/SeasonImages.cs index 9a93dd6ae8..13f6d57c8d 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/SeasonImages.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/SeasonImages.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class SeasonImages { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/SeasonResult.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/SeasonResult.cs similarity index 84% rename from MediaBrowser.Providers/Tmdb/Models/TV/SeasonResult.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/SeasonResult.cs index bc9213c04d..13b4c30f80 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/SeasonResult.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/SeasonResult.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class SeasonResult { diff --git a/MediaBrowser.Providers/Tmdb/Models/TV/SeriesResult.cs b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/SeriesResult.cs similarity index 93% rename from MediaBrowser.Providers/Tmdb/Models/TV/SeriesResult.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Models/TV/SeriesResult.cs index ad95e502e4..5c1666c77c 100644 --- a/MediaBrowser.Providers/Tmdb/Models/TV/SeriesResult.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Models/TV/SeriesResult.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb.Models.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV { public class SeriesResult { diff --git a/MediaBrowser.Providers/Tmdb/Movies/GenericTmdbMovieInfo.cs b/MediaBrowser.Providers/Plugins/Tmdb/Movies/GenericTmdbMovieInfo.cs similarity index 99% rename from MediaBrowser.Providers/Tmdb/Movies/GenericTmdbMovieInfo.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Movies/GenericTmdbMovieInfo.cs index ad42b564c6..e1edb50e4f 100644 --- a/MediaBrowser.Providers/Tmdb/Movies/GenericTmdbMovieInfo.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Movies/GenericTmdbMovieInfo.cs @@ -13,10 +13,10 @@ using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; using MediaBrowser.Model.IO; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.Movies; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Providers.Tmdb.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Movies { public class GenericTmdbMovieInfo where T : BaseItem, new() diff --git a/MediaBrowser.Providers/Tmdb/Movies/TmdbImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbImageProvider.cs similarity index 97% rename from MediaBrowser.Providers/Tmdb/Movies/TmdbImageProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbImageProvider.cs index 039a49728b..3f77860f1d 100644 --- a/MediaBrowser.Providers/Tmdb/Movies/TmdbImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbImageProvider.cs @@ -13,10 +13,10 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.IO; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.General; -using MediaBrowser.Providers.Tmdb.Models.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.Movies; -namespace MediaBrowser.Providers.Tmdb.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Movies { public class TmdbImageProvider : IRemoteImageProvider, IHasOrder { diff --git a/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieExternalId.cs similarity index 94% rename from MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieExternalId.cs index fc7a4583fd..a3fac29e54 100644 --- a/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieExternalId.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieExternalId.cs @@ -4,7 +4,7 @@ using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -namespace MediaBrowser.Providers.Tmdb.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Movies { public class TmdbMovieExternalId : IExternalId { diff --git a/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs similarity index 99% rename from MediaBrowser.Providers/Tmdb/Movies/TmdbMovieProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs index 3787d4003b..981d31cc4f 100644 --- a/MediaBrowser.Providers/Tmdb/Movies/TmdbMovieProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbMovieProvider.cs @@ -15,15 +15,14 @@ using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Globalization; using MediaBrowser.Model.IO; using MediaBrowser.Model.Net; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.Movies; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Providers.Tmdb.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Movies { /// /// Class MovieDbProvider diff --git a/MediaBrowser.Providers/Tmdb/Movies/TmdbSearch.cs b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSearch.cs similarity index 99% rename from MediaBrowser.Providers/Tmdb/Movies/TmdbSearch.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSearch.cs index bf63946084..1131e0c722 100644 --- a/MediaBrowser.Providers/Tmdb/Movies/TmdbSearch.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSearch.cs @@ -3,19 +3,19 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Net; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; -using System.Text.RegularExpressions; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.Search; +using MediaBrowser.Providers.Plugins.Tmdb.Models.Search; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Providers.Tmdb.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Movies { public class TmdbSearch { diff --git a/MediaBrowser.Providers/Tmdb/Movies/TmdbSettings.cs b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSettings.cs similarity index 90% rename from MediaBrowser.Providers/Tmdb/Movies/TmdbSettings.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSettings.cs index dca406b99a..03669ca67c 100644 --- a/MediaBrowser.Providers/Tmdb/Movies/TmdbSettings.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Movies/TmdbSettings.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace MediaBrowser.Providers.Tmdb.Movies +namespace MediaBrowser.Providers.Plugins.Tmdb.Movies { internal class TmdbImageSettings { diff --git a/MediaBrowser.Providers/Tmdb/Music/TmdbMusicVideoProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/Music/TmdbMusicVideoProvider.cs similarity index 91% rename from MediaBrowser.Providers/Tmdb/Music/TmdbMusicVideoProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Music/TmdbMusicVideoProvider.cs index 81909fa38f..d173bcc9a9 100644 --- a/MediaBrowser.Providers/Tmdb/Music/TmdbMusicVideoProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Music/TmdbMusicVideoProvider.cs @@ -6,9 +6,9 @@ using MediaBrowser.Common.Net; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Providers; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; -namespace MediaBrowser.Providers.Tmdb.Music +namespace MediaBrowser.Providers.Plugins.Tmdb.Music { public class TmdbMusicVideoProvider : IRemoteMetadataProvider { diff --git a/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonExternalId.cs similarity index 91% rename from MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs rename to MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonExternalId.cs index 2c61bc70aa..c7b04e42ba 100644 --- a/MediaBrowser.Providers/Tmdb/People/TmdbPersonExternalId.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonExternalId.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -namespace MediaBrowser.Providers.Tmdb.People +namespace MediaBrowser.Providers.Plugins.Tmdb.People { public class TmdbPersonExternalId : IExternalId { diff --git a/MediaBrowser.Providers/Tmdb/People/TmdbPersonImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonImageProvider.cs similarity index 95% rename from MediaBrowser.Providers/Tmdb/People/TmdbPersonImageProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonImageProvider.cs index e205d796ae..e385207d92 100644 --- a/MediaBrowser.Providers/Tmdb/People/TmdbPersonImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonImageProvider.cs @@ -10,11 +10,11 @@ using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.General; -using MediaBrowser.Providers.Tmdb.Models.People; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.People; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; -namespace MediaBrowser.Providers.Tmdb.People +namespace MediaBrowser.Providers.Plugins.Tmdb.People { public class TmdbPersonImageProvider : IRemoteImageProvider, IHasOrder { diff --git a/MediaBrowser.Providers/Tmdb/People/TmdbPersonProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonProvider.cs similarity index 97% rename from MediaBrowser.Providers/Tmdb/People/TmdbPersonProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonProvider.cs index 1f09badbc5..93c1cd47d3 100644 --- a/MediaBrowser.Providers/Tmdb/People/TmdbPersonProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/People/TmdbPersonProvider.cs @@ -17,13 +17,13 @@ using MediaBrowser.Model.IO; using MediaBrowser.Model.Net; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.General; -using MediaBrowser.Providers.Tmdb.Models.People; -using MediaBrowser.Providers.Tmdb.Models.Search; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.People; +using MediaBrowser.Providers.Plugins.Tmdb.Models.Search; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Providers.Tmdb.People +namespace MediaBrowser.Providers.Plugins.Tmdb.People { public class TmdbPersonProvider : IRemoteMetadataProvider { diff --git a/MediaBrowser.Providers/Tmdb/TV/TmdbEpisodeImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeImageProvider.cs similarity index 96% rename from MediaBrowser.Providers/Tmdb/TV/TmdbEpisodeImageProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeImageProvider.cs index 558c8149e5..1d7ad43428 100644 --- a/MediaBrowser.Providers/Tmdb/TV/TmdbEpisodeImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeImageProvider.cs @@ -13,11 +13,11 @@ using MediaBrowser.Model.Globalization; using MediaBrowser.Model.IO; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.General; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Providers.Tmdb.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.TV { public class TmdbEpisodeImageProvider : TmdbEpisodeProviderBase, @@ -80,7 +80,6 @@ namespace MediaBrowser.Providers.Tmdb.TV RatingType = RatingType.Score })); - var isLanguageEn = string.Equals(language, "en", StringComparison.OrdinalIgnoreCase); return list.OrderByDescending(i => @@ -89,6 +88,7 @@ namespace MediaBrowser.Providers.Tmdb.TV { return 3; } + if (!isLanguageEn) { if (string.Equals("en", i.Language, StringComparison.OrdinalIgnoreCase)) @@ -96,15 +96,16 @@ namespace MediaBrowser.Providers.Tmdb.TV return 2; } } + if (string.IsNullOrEmpty(i.Language)) { return isLanguageEn ? 3 : 2; } + return 0; }) .ThenByDescending(i => i.CommunityRating ?? 0) .ThenByDescending(i => i.VoteCount ?? 0); - } private IEnumerable GetPosters(StillImages images) @@ -112,7 +113,6 @@ namespace MediaBrowser.Providers.Tmdb.TV return images.Stills ?? new List(); } - public Task GetImageResponse(string url, CancellationToken cancellationToken) { return GetResponse(url, cancellationToken); diff --git a/MediaBrowser.Providers/Tmdb/TV/TmdbEpisodeProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProvider.cs similarity index 99% rename from MediaBrowser.Providers/Tmdb/TV/TmdbEpisodeProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProvider.cs index a17f5d17a2..d143cbd108 100644 --- a/MediaBrowser.Providers/Tmdb/TV/TmdbEpisodeProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProvider.cs @@ -18,7 +18,7 @@ using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Providers.Tmdb.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.TV { public class TmdbEpisodeProvider : TmdbEpisodeProviderBase, @@ -203,6 +203,7 @@ namespace MediaBrowser.Providers.Tmdb.TV { return GetResponse(url, cancellationToken); } + // After TheTvDb public int Order => 1; diff --git a/MediaBrowser.Providers/Tmdb/TV/TmdbEpisodeProviderBase.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProviderBase.cs similarity index 97% rename from MediaBrowser.Providers/Tmdb/TV/TmdbEpisodeProviderBase.cs rename to MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProviderBase.cs index f6f607a1e1..f82f5f2ab8 100644 --- a/MediaBrowser.Providers/Tmdb/TV/TmdbEpisodeProviderBase.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbEpisodeProviderBase.cs @@ -8,11 +8,11 @@ using MediaBrowser.Controller.Configuration; using MediaBrowser.Model.Globalization; using MediaBrowser.Model.IO; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.TV; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.TV; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Providers.Tmdb.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.TV { public abstract class TmdbEpisodeProviderBase { @@ -53,6 +53,7 @@ namespace MediaBrowser.Providers.Tmdb.TV { throw new ArgumentNullException(nameof(tmdbId)); } + if (string.IsNullOrEmpty(language)) { throw new ArgumentNullException(nameof(language)); @@ -80,6 +81,7 @@ namespace MediaBrowser.Providers.Tmdb.TV { throw new ArgumentNullException(nameof(tmdbId)); } + if (string.IsNullOrEmpty(preferredLanguage)) { throw new ArgumentNullException(nameof(preferredLanguage)); diff --git a/MediaBrowser.Providers/Tmdb/TV/TmdbSeasonImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs similarity index 96% rename from MediaBrowser.Providers/Tmdb/TV/TmdbSeasonImageProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs index 698a436046..eb659253e1 100644 --- a/MediaBrowser.Providers/Tmdb/TV/TmdbSeasonImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonImageProvider.cs @@ -12,10 +12,10 @@ using MediaBrowser.Model.Dto; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.General; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; -namespace MediaBrowser.Providers.Tmdb.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.TV { public class TmdbSeasonImageProvider : IRemoteImageProvider, IHasOrder { diff --git a/MediaBrowser.Providers/Tmdb/TV/TmdbSeasonProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonProvider.cs similarity index 98% rename from MediaBrowser.Providers/Tmdb/TV/TmdbSeasonProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonProvider.cs index 832b64941e..040ff7449f 100644 --- a/MediaBrowser.Providers/Tmdb/TV/TmdbSeasonProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeasonProvider.cs @@ -14,12 +14,12 @@ using MediaBrowser.Model.IO; using MediaBrowser.Model.Net; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.TV; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.TV; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; using Microsoft.Extensions.Logging; using Season = MediaBrowser.Controller.Entities.TV.Season; -namespace MediaBrowser.Providers.Tmdb.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.TV { public class TmdbSeasonProvider : IRemoteMetadataProvider { @@ -145,6 +145,7 @@ namespace MediaBrowser.Providers.Tmdb.TV { throw new ArgumentNullException(nameof(tmdbId)); } + if (string.IsNullOrEmpty(language)) { throw new ArgumentNullException(nameof(language)); @@ -172,6 +173,7 @@ namespace MediaBrowser.Providers.Tmdb.TV { throw new ArgumentNullException(nameof(tmdbId)); } + if (string.IsNullOrEmpty(preferredLanguage)) { throw new ArgumentNullException(nameof(preferredLanguage)); @@ -216,7 +218,6 @@ namespace MediaBrowser.Providers.Tmdb.TV Url = url, CancellationToken = cancellationToken, AcceptHeader = TmdbUtils.AcceptHeader - }).ConfigureAwait(false)) { using (var json = response.Content) diff --git a/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesExternalId.cs similarity index 92% rename from MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs rename to MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesExternalId.cs index 524a3b05e2..41fb968827 100644 --- a/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesExternalId.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesExternalId.cs @@ -2,7 +2,7 @@ using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -namespace MediaBrowser.Providers.Tmdb.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.TV { public class TmdbSeriesExternalId : IExternalId { diff --git a/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesImageProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs similarity index 96% rename from MediaBrowser.Providers/Tmdb/TV/TmdbSeriesImageProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs index 0460fe9940..30a5295f31 100644 --- a/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesImageProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesImageProvider.cs @@ -12,11 +12,11 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.IO; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.General; -using MediaBrowser.Providers.Tmdb.Models.TV; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.TV; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; -namespace MediaBrowser.Providers.Tmdb.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.TV { public class TmdbSeriesImageProvider : IRemoteImageProvider, IHasOrder { @@ -99,6 +99,7 @@ namespace MediaBrowser.Providers.Tmdb.TV { return 3; } + if (!isLanguageEn) { if (string.Equals("en", i.Language, StringComparison.OrdinalIgnoreCase)) @@ -106,10 +107,12 @@ namespace MediaBrowser.Providers.Tmdb.TV return 2; } } + if (string.IsNullOrEmpty(i.Language)) { return isLanguageEn ? 3 : 2; } + return 0; }) .ThenByDescending(i => i.CommunityRating ?? 0) @@ -171,6 +174,7 @@ namespace MediaBrowser.Providers.Tmdb.TV return null; } + // After tvdb and fanart public int Order => 2; diff --git a/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs similarity index 99% rename from MediaBrowser.Providers/Tmdb/TV/TmdbSeriesProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs index 649c5474bf..1de7660edc 100644 --- a/MediaBrowser.Providers/Tmdb/TV/TmdbSeriesProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TV/TmdbSeriesProvider.cs @@ -17,12 +17,12 @@ using MediaBrowser.Model.Globalization; using MediaBrowser.Model.IO; using MediaBrowser.Model.Providers; using MediaBrowser.Model.Serialization; -using MediaBrowser.Providers.Tmdb.Models.Search; -using MediaBrowser.Providers.Tmdb.Models.TV; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Models.Search; +using MediaBrowser.Providers.Plugins.Tmdb.Models.TV; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; using Microsoft.Extensions.Logging; -namespace MediaBrowser.Providers.Tmdb.TV +namespace MediaBrowser.Providers.Plugins.Tmdb.TV { public class TmdbSeriesProvider : IRemoteMetadataProvider, IHasOrder { @@ -263,10 +263,12 @@ namespace MediaBrowser.Providers.Tmdb.TV { series.SetProviderId(MetadataProviders.Imdb, ids.Imdb_Id); } + if (ids.Tvrage_Id > 0) { series.SetProviderId(MetadataProviders.TvRage, ids.Tvrage_Id.ToString(_usCulture)); } + if (ids.Tvdb_Id > 0) { series.SetProviderId(MetadataProviders.Tvdb, ids.Tvdb_Id.ToString(_usCulture)); @@ -416,7 +418,6 @@ namespace MediaBrowser.Providers.Tmdb.TV Url = url, CancellationToken = cancellationToken, AcceptHeader = TmdbUtils.AcceptHeader - }).ConfigureAwait(false)) { using (var json = response.Content) @@ -453,7 +454,6 @@ namespace MediaBrowser.Providers.Tmdb.TV Url = url, CancellationToken = cancellationToken, AcceptHeader = TmdbUtils.AcceptHeader - }).ConfigureAwait(false)) { using (var json = response.Content) @@ -518,7 +518,6 @@ namespace MediaBrowser.Providers.Tmdb.TV Url = url, CancellationToken = cancellationToken, AcceptHeader = TmdbUtils.AcceptHeader - }).ConfigureAwait(false)) { using (var json = response.Content) diff --git a/MediaBrowser.Providers/Tmdb/TmdbUtils.cs b/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs similarity index 93% rename from MediaBrowser.Providers/Tmdb/TmdbUtils.cs rename to MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs index 7dacc74044..2f1e8b791a 100644 --- a/MediaBrowser.Providers/Tmdb/TmdbUtils.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/TmdbUtils.cs @@ -1,11 +1,11 @@ using System; using MediaBrowser.Model.Entities; -using MediaBrowser.Providers.Tmdb.Models.General; +using MediaBrowser.Providers.Plugins.Tmdb.Models.General; -namespace MediaBrowser.Providers.Tmdb +namespace MediaBrowser.Providers.Plugins.Tmdb { /// - /// Utilities for the TMDb provider + /// Utilities for the TMDb provider. /// public static class TmdbUtils { diff --git a/MediaBrowser.Providers/Tmdb/Trailers/TmdbTrailerProvider.cs b/MediaBrowser.Providers/Plugins/Tmdb/Trailers/TmdbTrailerProvider.cs similarity index 92% rename from MediaBrowser.Providers/Tmdb/Trailers/TmdbTrailerProvider.cs rename to MediaBrowser.Providers/Plugins/Tmdb/Trailers/TmdbTrailerProvider.cs index b15de01255..ee5128db4a 100644 --- a/MediaBrowser.Providers/Tmdb/Trailers/TmdbTrailerProvider.cs +++ b/MediaBrowser.Providers/Plugins/Tmdb/Trailers/TmdbTrailerProvider.cs @@ -5,9 +5,9 @@ using MediaBrowser.Common.Net; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Providers; -using MediaBrowser.Providers.Tmdb.Movies; +using MediaBrowser.Providers.Plugins.Tmdb.Movies; -namespace MediaBrowser.Providers.Tmdb.Trailers +namespace MediaBrowser.Providers.Plugins.Tmdb.Trailers { public class TmdbTrailerProvider : IHasOrder, IRemoteMetadataProvider {