Fix api url
This commit is contained in:
parent
817d9b3389
commit
5ea1299030
|
@ -11,7 +11,7 @@ namespace MediaBrowser.Providers.Tmdb.BoxSets
|
|||
|
||||
public string Key => MetadataProviders.TmdbCollection.ToString();
|
||||
|
||||
public string UrlFormatString => TmdbUtils.BaseMovieDbUrl + "collection/{0}";
|
||||
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "collection/{0}";
|
||||
|
||||
public bool Supports(IHasProviderIds item)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace MediaBrowser.Providers.Tmdb.BoxSets
|
|||
{
|
||||
public class TmdbBoxSetProvider : IRemoteMetadataProvider<BoxSet, BoxSetInfo>
|
||||
{
|
||||
private const string GetCollectionInfo3 = TmdbUtils.BaseMovieDbUrl + @"3/collection/{0}?api_key={1}&append_to_response=images";
|
||||
private const string GetCollectionInfo3 = TmdbUtils.BaseTmdbApiUrl + @"3/collection/{0}?api_key={1}&append_to_response=images";
|
||||
|
||||
internal static TmdbBoxSetProvider Current;
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace MediaBrowser.Providers.Tmdb.Movies
|
|||
|
||||
public string Key => MetadataProviders.Tmdb.ToString();
|
||||
|
||||
public string UrlFormatString => TmdbUtils.BaseMovieDbUrl + "movie/{0}";
|
||||
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "movie/{0}";
|
||||
|
||||
public bool Supports(IHasProviderIds item)
|
||||
{
|
||||
|
|
|
@ -157,8 +157,8 @@ namespace MediaBrowser.Providers.Tmdb.Movies
|
|||
}
|
||||
}
|
||||
|
||||
private const string TmdbConfigUrl = TmdbUtils.BaseMovieDbUrl + "3/configuration?api_key={0}";
|
||||
private const string GetMovieInfo3 = TmdbUtils.BaseMovieDbUrl + @"3/movie/{0}?api_key={1}&append_to_response=casts,releases,images,keywords,trailers";
|
||||
private const string TmdbConfigUrl = TmdbUtils.BaseTmdbApiUrl + "3/configuration?api_key={0}";
|
||||
private const string GetMovieInfo3 = TmdbUtils.BaseTmdbApiUrl + @"3/movie/{0}?api_key={1}&append_to_response=casts,releases,images,keywords,trailers";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the movie data path.
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace MediaBrowser.Providers.Tmdb.Movies
|
|||
public class TmdbSearch
|
||||
{
|
||||
private static readonly CultureInfo EnUs = new CultureInfo("en-US");
|
||||
private const string Search3 = TmdbUtils.BaseMovieDbUrl + @"3/search/{3}?api_key={1}&query={0}&language={2}";
|
||||
private const string Search3 = TmdbUtils.BaseTmdbApiUrl + @"3/search/{3}?api_key={1}&query={0}&language={2}";
|
||||
|
||||
private readonly ILogger _logger;
|
||||
private readonly IJsonSerializer _json;
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace MediaBrowser.Providers.Tmdb.People
|
|||
|
||||
public string Key => MetadataProviders.Tmdb.ToString();
|
||||
|
||||
public string UrlFormatString => TmdbUtils.BaseMovieDbUrl + "person/{0}";
|
||||
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "person/{0}";
|
||||
|
||||
public bool Supports(IHasProviderIds item)
|
||||
{
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace MediaBrowser.Providers.Tmdb.People
|
|||
return new List<RemoteSearchResult>();
|
||||
}
|
||||
|
||||
var url = string.Format(TmdbUtils.BaseMovieDbUrl + @"3/search/person?api_key={1}&query={0}", WebUtility.UrlEncode(searchInfo.Name), TmdbUtils.ApiKey);
|
||||
var url = string.Format(TmdbUtils.BaseTmdbApiUrl + @"3/search/person?api_key={1}&query={0}", WebUtility.UrlEncode(searchInfo.Name), TmdbUtils.ApiKey);
|
||||
|
||||
using (var response = await TmdbMovieProvider.Current.GetMovieDbResponse(new HttpRequestOptions
|
||||
{
|
||||
|
@ -219,7 +219,7 @@ namespace MediaBrowser.Providers.Tmdb.People
|
|||
return;
|
||||
}
|
||||
|
||||
var url = string.Format(TmdbUtils.BaseMovieDbUrl + @"3/person/{1}?api_key={0}&append_to_response=credits,images,external_ids", TmdbUtils.ApiKey, id);
|
||||
var url = string.Format(TmdbUtils.BaseTmdbApiUrl + @"3/person/{1}?api_key={0}&append_to_response=credits,images,external_ids", TmdbUtils.ApiKey, id);
|
||||
|
||||
using (var response = await TmdbMovieProvider.Current.GetMovieDbResponse(new HttpRequestOptions
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace MediaBrowser.Providers.Tmdb.TV
|
|||
{
|
||||
public abstract class TmdbEpisodeProviderBase
|
||||
{
|
||||
private const string EpisodeUrlPattern = TmdbUtils.BaseMovieDbUrl + @"3/tv/{0}/season/{1}/episode/{2}?api_key={3}&append_to_response=images,external_ids,credits,videos";
|
||||
private const string EpisodeUrlPattern = TmdbUtils.BaseTmdbApiUrl + @"3/tv/{0}/season/{1}/episode/{2}?api_key={3}&append_to_response=images,external_ids,credits,videos";
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly IServerConfigurationManager _configurationManager;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace MediaBrowser.Providers.Tmdb.TV
|
|||
{
|
||||
public class TmdbSeasonProvider : IRemoteMetadataProvider<Season, SeasonInfo>
|
||||
{
|
||||
private const string GetTvInfo3 = TmdbUtils.BaseMovieDbUrl + @"3/tv/{0}/season/{1}?api_key={2}&append_to_response=images,keywords,external_ids,credits,videos";
|
||||
private const string GetTvInfo3 = TmdbUtils.BaseTmdbApiUrl + @"3/tv/{0}/season/{1}?api_key={2}&append_to_response=images,keywords,external_ids,credits,videos";
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly IServerConfigurationManager _configurationManager;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace MediaBrowser.Providers.Tmdb.TV
|
|||
|
||||
public string Key => MetadataProviders.Tmdb.ToString();
|
||||
|
||||
public string UrlFormatString => TmdbUtils.BaseMovieDbUrl + "tv/{0}";
|
||||
public string UrlFormatString => TmdbUtils.BaseTmdbUrl + "tv/{0}";
|
||||
|
||||
public bool Supports(IHasProviderIds item)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace MediaBrowser.Providers.Tmdb.TV
|
|||
{
|
||||
public class TmdbSeriesProvider : IRemoteMetadataProvider<Series, SeriesInfo>, IHasOrder
|
||||
{
|
||||
private const string GetTvInfo3 = TmdbUtils.BaseMovieDbUrl + @"3/tv/{0}?api_key={1}&append_to_response=credits,images,keywords,external_ids,videos,content_ratings";
|
||||
private const string GetTvInfo3 = TmdbUtils.BaseTmdbApiUrl + @"3/tv/{0}?api_key={1}&append_to_response=credits,images,keywords,external_ids,videos,content_ratings";
|
||||
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
||||
|
||||
internal static TmdbSeriesProvider Current { get; private set; }
|
||||
|
@ -470,7 +470,7 @@ namespace MediaBrowser.Providers.Tmdb.TV
|
|||
|
||||
private async Task<RemoteSearchResult> FindByExternalId(string id, string externalSource, CancellationToken cancellationToken)
|
||||
{
|
||||
var url = string.Format(TmdbUtils.BaseMovieDbUrl + @"3/find/{0}?api_key={1}&external_source={2}",
|
||||
var url = string.Format(TmdbUtils.BaseTmdbApiUrl + @"3/find/{0}?api_key={1}&external_source={2}",
|
||||
id,
|
||||
TmdbUtils.ApiKey,
|
||||
externalSource);
|
||||
|
|
|
@ -6,7 +6,8 @@ namespace MediaBrowser.Providers.Tmdb
|
|||
{
|
||||
public static class TmdbUtils
|
||||
{
|
||||
public const string BaseMovieDbUrl = "https://www.themoviedb.org/";
|
||||
public const string BaseTmdbUrl = "https://www.themoviedb.org/";
|
||||
public const string BaseTmdbApiUrl = "https://api.themoviedb.org/";
|
||||
public const string ProviderName = "TheMovieDb";
|
||||
public const string ApiKey = "4219e299c89411838049ab0dab19ebd5";
|
||||
public const string AcceptHeader = "application/json,image/*";
|
||||
|
|
Loading…
Reference in New Issue
Block a user