Merge pull request #1693 from nfnty/api

Use HTTPS for API requests: Fix TheMovieDb and FanArt
pull/702/head
Luke 9 years ago
commit 6375920933

@ -61,7 +61,7 @@ namespace MediaBrowser.Providers.BoxSets
{
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
var tmdbImageUrl = tmdbSettings.images.secure_base_url + "original";
return GetImages(mainResult, language, tmdbImageUrl);
}

@ -64,7 +64,7 @@ namespace MediaBrowser.Providers.BoxSets
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
var tmdbImageUrl = tmdbSettings.images.secure_base_url + "original";
var result = new RemoteSearchResult
{

@ -16,6 +16,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using CommonIO;
@ -185,6 +186,7 @@ namespace MediaBrowser.Providers.Movies
PopulateImages(list, obj.moviebackground, ImageType.Backdrop, 1920, 1080);
}
private Regex _regex_http = new Regex("^http://");
private void PopulateImages(List<RemoteImageInfo> list, List<Image> images, ImageType type, int width, int height)
{
if (images == null)
@ -208,7 +210,7 @@ namespace MediaBrowser.Providers.Movies
Width = width,
Height = height,
ProviderName = Name,
Url = url,
Url = _regex_http.Replace(url, "https://", 1),
Language = i.lang
};

@ -249,7 +249,7 @@ namespace MediaBrowser.Providers.Movies
}
resultItem.ResetPeople();
var tmdbImageUrl = settings.images.base_url + "original";
var tmdbImageUrl = settings.images.secure_base_url + "original";
//Actors, Directors, Writers - all in People
//actors come from cast

@ -72,7 +72,7 @@ namespace MediaBrowser.Providers.Movies
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
var tmdbImageUrl = tmdbSettings.images.secure_base_url + "original";
var supportedImages = GetSupportedImages(item).ToList();

@ -78,7 +78,7 @@ namespace MediaBrowser.Providers.Movies
var tmdbSettings = await GetTmdbSettings(cancellationToken).ConfigureAwait(false);
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
var tmdbImageUrl = tmdbSettings.images.secure_base_url + "original";
var remoteResult = new RemoteSearchResult
{

@ -56,7 +56,7 @@ namespace MediaBrowser.Providers.Movies
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
var tmdbImageUrl = tmdbSettings.images.secure_base_url + "original";
if (!string.IsNullOrWhiteSpace(name))
{

@ -5,7 +5,7 @@ namespace MediaBrowser.Providers.Movies
internal class TmdbImageSettings
{
public List<string> backdrop_sizes { get; set; }
public string base_url { get; set; }
public string secure_base_url { get; set; }
public List<string> poster_sizes { get; set; }
public List<string> profile_sizes { get; set; }
}

@ -67,7 +67,7 @@ namespace MediaBrowser.Providers.People
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
var tmdbImageUrl = tmdbSettings.images.secure_base_url + "original";
return GetImages(images, item.GetPreferredMetadataLanguage(), tmdbImageUrl);
}

@ -59,7 +59,7 @@ namespace MediaBrowser.Providers.People
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
var tmdbImageUrl = tmdbSettings.images.secure_base_url + "original";
if (!string.IsNullOrEmpty(tmdbId))
{

@ -62,7 +62,7 @@ namespace MediaBrowser.Providers.TV
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
var tmdbImageUrl = tmdbSettings.images.secure_base_url + "original";
list.AddRange(GetPosters(response.images).Select(i => new RemoteImageInfo
{

@ -64,7 +64,7 @@ namespace MediaBrowser.Providers.TV
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
var tmdbImageUrl = tmdbSettings.images.secure_base_url + "original";
list.AddRange(GetPosters(results).Select(i => new RemoteImageInfo
{

@ -69,7 +69,7 @@ namespace MediaBrowser.Providers.TV
var obj = _jsonSerializer.DeserializeFromFile<RootObject>(dataFilePath);
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
var tmdbImageUrl = tmdbSettings.images.secure_base_url + "original";
var remoteResult = new RemoteSearchResult
{
@ -460,7 +460,7 @@ namespace MediaBrowser.Providers.TV
if (tv != null)
{
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
var tmdbImageUrl = tmdbSettings.images.base_url + "original";
var tmdbImageUrl = tmdbSettings.images.secure_base_url + "original";
var remoteResult = new RemoteSearchResult
{

Loading…
Cancel
Save