Merge pull request #3208 from jellyfin/plugins

More work for core plugins
This commit is contained in:
dkanada 2020-06-06 12:27:45 +09:00 committed by GitHub
commit 6d4f3c42a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
86 changed files with 374 additions and 197 deletions

View File

@ -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; }
}
}

View File

@ -0,0 +1,9 @@
using MediaBrowser.Model.Plugins;
namespace MediaBrowser.Providers.Plugins.Omdb
{
public class PluginConfiguration : BasePluginConfiguration
{
public bool CastAndCrew { get; set; }
}
}

View File

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html>
<head>
<title>OMDb</title>
</head>
<body>
<div data-role="page" class="page type-interior pluginConfigurationPage configPage" data-require="emby-input,emby-button,emby-checkbox">
<div data-role="content">
<div class="content-primary">
<form class="configForm">
<label class="checkboxContainer">
<input is="emby-checkbox" type="checkbox" id="castAndCrew" />
<span>Collect information about the cast and other crew members from OMDb.</span>
</label>
<br />
<div>
<button is="emby-button" type="submit" class="raised button-submit block"><span>Save</span></button>
</div>
</form>
</div>
</div>
<script type="text/javascript">
var PluginConfig = {
pluginId: "a628c0da-fac5-4c7e-9d1a-7134223f14c8"
};
$('.configPage').on('pageshow', function () {
Dashboard.showLoadingMsg();
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
$('#castAndCrew').checked = config.CastAndCrew;
Dashboard.hideLoadingMsg();
});
});
$('.configForm').on('submit', function (e) {
Dashboard.showLoadingMsg();
var form = this;
ApiClient.getPluginConfiguration(PluginConfig.pluginId).then(function (config) {
config.CastAndCrew = $('#castAndCrew', form).checked;
ApiClient.updatePluginConfiguration(PluginConfig.pluginId, config).then(Dashboard.processPluginConfigurationUpdateResult);
});
return false;
});
</script>
</div>
</body>
</html>

View File

@ -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;

View File

@ -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);

View File

@ -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
// };
if (!Plugin.Instance.Configuration.CastAndCrew)
{
return;
}
// itemResult.AddPerson(person);
//}
if (!string.IsNullOrWhiteSpace(result.Director))
{
var person = new PersonInfo
{
Name = result.Director.Trim(),
Type = PersonType.Director
};
//if (!string.IsNullOrWhiteSpace(result.Writer))
//{
// var person = new PersonInfo
// {
// Name = result.Director.Trim(),
// Type = PersonType.Writer
// };
itemResult.AddPerson(person);
}
// itemResult.AddPerson(person);
//}
if (!string.IsNullOrWhiteSpace(result.Writer))
{
var person = new PersonInfo
{
Name = result.Director.Trim(),
Type = PersonType.Writer
};
//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);
}
// 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<OmdbRating> 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; }
}
}

View File

@ -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<PluginConfiguration>, 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<PluginPageInfo> GetPages()
{
yield return new PluginPageInfo
{
Name = Name,
EmbeddedResourcePath = GetType().Namespace + ".Configuration.config.html"
};
}
}
}

View File

@ -0,0 +1,8 @@
using MediaBrowser.Model.Plugins;
namespace MediaBrowser.Providers.Plugins.TheTvdb
{
public class PluginConfiguration : BasePluginConfiguration
{
}
}

View File

@ -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<PluginConfiguration>
{
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;
}
}
}

View File

@ -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<TvDbResponse<Actor[]>> 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;

View File

@ -14,9 +14,8 @@ using TvDbSharper.Dto;
namespace MediaBrowser.Providers.Plugins.TheTvdb
{
/// <summary>
/// Class RemoteEpisodeProvider
/// Class RemoteEpisodeProvider.
/// </summary>
public class TvdbEpisodeProvider : IRemoteMetadataProvider<Episode, EpisodeInfo>, IHasOrder
{
@ -139,7 +138,6 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
Name = episode.EpisodeName,
Overview = episode.Overview,
CommunityRating = (float?)episode.SiteRating,
}
};
result.ResetPeople();

View File

@ -57,7 +57,6 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
{
EnableImages = false
}
}).Cast<Series>()
.Where(i => TvdbSeriesProvider.IsValidSeries(i.ProviderIds))
.ToList();

View File

@ -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<RemoteImageInfo>();
}
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))

View File

@ -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))

View File

@ -22,6 +22,7 @@ namespace MediaBrowser.Providers.Plugins.TheTvdb
public class TvdbSeriesProvider : IRemoteMetadataProvider<Series, SeriesInfo>, 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<string> GetSeriesByRemoteId(string id, string idType, string language, CancellationToken cancellationToken)
{
TvDbResponse<SeriesSearchResult[]> 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
}
/// <summary>
/// The remove
/// The remove.
/// </summary>
const string remove = "\"'!`?";
/// <summary>
/// The spacers
/// The spacers.
/// </summary>
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+", " ");
}

View File

@ -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
{

View File

@ -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)

View File

@ -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<BoxSet, BoxSetInfo>
{
@ -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;
}

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace MediaBrowser.Providers.Tmdb.Models.Collections
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Collections
{
public class CollectionResult
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.Collections
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Collections
{
public class Part
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class Backdrop
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class Crew
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class ExternalIds
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class Genre
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class Images
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class Keyword
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class Keywords
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class Poster
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class Profile
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class Still
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class StillImages
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class Video
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace MediaBrowser.Providers.Tmdb.Models.General
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.General
{
public class Videos
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.Movies
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies
{
public class BelongsToCollection
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.Movies
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies
{
public class Cast
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using System;
namespace MediaBrowser.Providers.Tmdb.Models.Movies
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies
{
public class Country
{

View File

@ -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
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.Movies
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies
{
public class ProductionCompany
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.Movies
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies
{
public class ProductionCountry
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace MediaBrowser.Providers.Tmdb.Models.Movies
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies
{
public class Releases
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.Movies
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies
{
public class SpokenLanguage
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace MediaBrowser.Providers.Tmdb.Models.Movies
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies
{
public class Trailers
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.Movies
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Movies
{
public class Youtube
{

View File

@ -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
{

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace MediaBrowser.Providers.Tmdb.Models.Search
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Search
{
public class ExternalIdLookupResult
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.Search
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Search
{
public class MovieResult
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.Search
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Search
{
public class PersonSearchResult
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace MediaBrowser.Providers.Tmdb.Models.Search
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Search
{
public class TmdbSearchResult<T>
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.Search
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.Search
{
public class TvResult
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.TV
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV
{
public class Cast
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.TV
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV
{
public class ContentRating
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace MediaBrowser.Providers.Tmdb.Models.TV
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV
{
public class ContentRatings
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.TV
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV
{
public class CreatedBy
{

View File

@ -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
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.TV
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV
{
public class Episode
{

View File

@ -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
{

View File

@ -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
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.TV
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV
{
public class GuestStar
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.TV
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV
{
public class Network
{

View File

@ -1,4 +1,4 @@
namespace MediaBrowser.Providers.Tmdb.Models.TV
namespace MediaBrowser.Providers.Plugins.Tmdb.Models.TV
{
public class Season
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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<T>
where T : BaseItem, new()

View File

@ -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
{

View File

@ -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
{

View File

@ -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
{
/// <summary>
/// Class MovieDbProvider

View File

@ -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
{

View File

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace MediaBrowser.Providers.Tmdb.Movies
namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
{
internal class TmdbImageSettings
{

View File

@ -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<MusicVideo, MusicVideoInfo>
{

View File

@ -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
{

View File

@ -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
{

View File

@ -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<Person, PersonLookupInfo>
{

View File

@ -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<Still> GetPosters(StillImages images)
@ -112,7 +113,6 @@ namespace MediaBrowser.Providers.Tmdb.TV
return images.Stills ?? new List<Still>();
}
public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken cancellationToken)
{
return GetResponse(url, cancellationToken);

View File

@ -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;

View File

@ -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));

View File

@ -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
{

View File

@ -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<Season, SeasonInfo>
{
@ -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)

View File

@ -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
{

View File

@ -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;

View File

@ -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<Series, SeriesInfo>, 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)

View File

@ -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
{
/// <summary>
/// Utilities for the TMDb provider
/// Utilities for the TMDb provider.
/// </summary>
public static class TmdbUtils
{

View File

@ -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<Trailer, TrailerInfo>
{