mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
Merge pull request #1693 from nfnty/api
Use HTTPS for API requests: Fix TheMovieDb and FanArt
This commit is contained in:
commit
6375920933
@ -61,7 +61,7 @@ namespace MediaBrowser.Providers.BoxSets
|
|||||||
{
|
{
|
||||||
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
|
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);
|
return GetImages(mainResult, language, tmdbImageUrl);
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ namespace MediaBrowser.Providers.BoxSets
|
|||||||
|
|
||||||
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
|
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
|
var result = new RemoteSearchResult
|
||||||
{
|
{
|
||||||
|
@ -16,6 +16,7 @@ using System.Collections.Generic;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using CommonIO;
|
using CommonIO;
|
||||||
@ -185,6 +186,7 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
PopulateImages(list, obj.moviebackground, ImageType.Backdrop, 1920, 1080);
|
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)
|
private void PopulateImages(List<RemoteImageInfo> list, List<Image> images, ImageType type, int width, int height)
|
||||||
{
|
{
|
||||||
if (images == null)
|
if (images == null)
|
||||||
@ -208,7 +210,7 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
Width = width,
|
Width = width,
|
||||||
Height = height,
|
Height = height,
|
||||||
ProviderName = Name,
|
ProviderName = Name,
|
||||||
Url = url,
|
Url = _regex_http.Replace(url, "https://", 1),
|
||||||
Language = i.lang
|
Language = i.lang
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
}
|
}
|
||||||
|
|
||||||
resultItem.ResetPeople();
|
resultItem.ResetPeople();
|
||||||
var tmdbImageUrl = settings.images.base_url + "original";
|
var tmdbImageUrl = settings.images.secure_base_url + "original";
|
||||||
|
|
||||||
//Actors, Directors, Writers - all in People
|
//Actors, Directors, Writers - all in People
|
||||||
//actors come from cast
|
//actors come from cast
|
||||||
|
@ -72,7 +72,7 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
|
|
||||||
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
|
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();
|
var supportedImages = GetSupportedImages(item).ToList();
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
|
|
||||||
var tmdbSettings = await GetTmdbSettings(cancellationToken).ConfigureAwait(false);
|
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
|
var remoteResult = new RemoteSearchResult
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,7 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
|
|
||||||
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
|
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))
|
if (!string.IsNullOrWhiteSpace(name))
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@ namespace MediaBrowser.Providers.Movies
|
|||||||
internal class TmdbImageSettings
|
internal class TmdbImageSettings
|
||||||
{
|
{
|
||||||
public List<string> backdrop_sizes { get; set; }
|
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> poster_sizes { get; set; }
|
||||||
public List<string> profile_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 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);
|
return GetImages(images, item.GetPreferredMetadataLanguage(), tmdbImageUrl);
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ namespace MediaBrowser.Providers.People
|
|||||||
|
|
||||||
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
|
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))
|
if (!string.IsNullOrEmpty(tmdbId))
|
||||||
{
|
{
|
||||||
|
@ -62,7 +62,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
|
|
||||||
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
|
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
|
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 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
|
list.AddRange(GetPosters(results).Select(i => new RemoteImageInfo
|
||||||
{
|
{
|
||||||
|
@ -69,7 +69,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
var obj = _jsonSerializer.DeserializeFromFile<RootObject>(dataFilePath);
|
var obj = _jsonSerializer.DeserializeFromFile<RootObject>(dataFilePath);
|
||||||
|
|
||||||
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
|
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
|
var remoteResult = new RemoteSearchResult
|
||||||
{
|
{
|
||||||
@ -460,7 +460,7 @@ namespace MediaBrowser.Providers.TV
|
|||||||
if (tv != null)
|
if (tv != null)
|
||||||
{
|
{
|
||||||
var tmdbSettings = await MovieDbProvider.Current.GetTmdbSettings(cancellationToken).ConfigureAwait(false);
|
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
|
var remoteResult = new RemoteSearchResult
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user