Merge pull request #1678 from nfnty/api

Use HTTPS for API requests
pull/702/head
Luke 8 years ago
commit 02a325f77b

@ -23,7 +23,7 @@ namespace MediaBrowser.Providers.BoxSets
{
public class MovieDbBoxSetProvider : IRemoteMetadataProvider<BoxSet, BoxSetInfo>
{
private const string GetCollectionInfo3 = @"http://api.themoviedb.org/3/collection/{0}?api_key={1}&append_to_response=images";
private const string GetCollectionInfo3 = @"https://api.themoviedb.org/3/collection/{0}?api_key={1}&append_to_response=images";
internal static MovieDbBoxSetProvider Current;

@ -20,7 +20,7 @@ namespace MediaBrowser.Providers.Movies
{
class FanartMovieUpdatesPostScanTask : ILibraryPostScanTask
{
private const string UpdatesUrl = "http://webservice.fanart.tv/v3/movies/latest?api_key={0}&date={1}";
private const string UpdatesUrl = "https://webservice.fanart.tv/v3/movies/latest?api_key={0}&date={1}";
/// <summary>
/// The _HTTP client

@ -31,7 +31,7 @@ namespace MediaBrowser.Providers.Movies
private readonly IFileSystem _fileSystem;
private readonly IJsonSerializer _json;
private const string FanArtBaseUrl = "http://webservice.fanart.tv/v3/movies/{1}?api_key={0}";
private const string FanArtBaseUrl = "https://webservice.fanart.tv/v3/movies/{1}?api_key={0}";
// &client_key=52c813aa7b8c8b3bb87f4797532a2f8c
internal static FanartMovieImageProvider Current;

@ -329,7 +329,7 @@ namespace MediaBrowser.Providers.Movies
{
hasTrailers.RemoteTrailers = movieData.trailers.youtube.Select(i => new MediaUrl
{
Url = string.Format("http://www.youtube.com/watch?v={0}", i.source),
Url = string.Format("https://www.youtube.com/watch?v={0}", i.source),
Name = i.name,
VideoSize = string.Equals("hd", i.size, StringComparison.OrdinalIgnoreCase) ? VideoSize.HighDefinition : VideoSize.StandardDefinition

@ -172,8 +172,8 @@ namespace MediaBrowser.Providers.Movies
}
}
private const string TmdbConfigUrl = "http://api.themoviedb.org/3/configuration?api_key={0}";
private const string GetMovieInfo3 = @"http://api.themoviedb.org/3/movie/{0}?api_key={1}&append_to_response=casts,releases,images,keywords,trailers";
private const string TmdbConfigUrl = "https://api.themoviedb.org/3/configuration?api_key={0}";
private const string GetMovieInfo3 = @"https://api.themoviedb.org/3/movie/{0}?api_key={1}&append_to_response=casts,releases,images,keywords,trailers";
internal static string ApiKey = "f6bd687ffa63cd282b6ff2c6877f2669";
internal static string AcceptHeader = "application/json,image/*";
@ -281,7 +281,7 @@ namespace MediaBrowser.Providers.Movies
public static string NormalizeLanguage(string language)
{
// They require this to be uppercase
// http://emby.media/community/index.php?/topic/32454-fr-follow-tmdbs-new-language-api-update/?p=311148
// https://emby.media/community/index.php?/topic/32454-fr-follow-tmdbs-new-language-api-update/?p=311148
var parts = language.Split('-');
if (parts.Length == 2)

@ -18,7 +18,7 @@ namespace MediaBrowser.Providers.Movies
public class MovieDbSearch
{
private static readonly CultureInfo EnUs = new CultureInfo("en-US");
private const string Search3 = @"http://api.themoviedb.org/3/search/{3}?api_key={1}&query={0}&language={2}";
private const string Search3 = @"https://api.themoviedb.org/3/search/{3}?api_key={1}&query={0}&language={2}";
internal static string ApiKey = "f6bd687ffa63cd282b6ff2c6877f2669";
internal static string AcceptHeader = "application/json,image/*";

@ -21,7 +21,7 @@ namespace MediaBrowser.Providers.Movies
public string UrlFormatString
{
get { return "http://www.themoviedb.org/movie/{0}"; }
get { return "https://www.themoviedb.org/movie/{0}"; }
}
public bool Supports(IHasProviderIds item)
@ -51,7 +51,7 @@ namespace MediaBrowser.Providers.Movies
public string UrlFormatString
{
get { return "http://www.themoviedb.org/tv/{0}"; }
get { return "https://www.themoviedb.org/tv/{0}"; }
}
public bool Supports(IHasProviderIds item)
@ -74,7 +74,7 @@ namespace MediaBrowser.Providers.Movies
public string UrlFormatString
{
get { return "http://www.themoviedb.org/collection/{0}"; }
get { return "https://www.themoviedb.org/collection/{0}"; }
}
public bool Supports(IHasProviderIds item)
@ -97,7 +97,7 @@ namespace MediaBrowser.Providers.Movies
public string UrlFormatString
{
get { return "http://www.themoviedb.org/person/{0}"; }
get { return "https://www.themoviedb.org/person/{0}"; }
}
public bool Supports(IHasProviderIds item)
@ -120,7 +120,7 @@ namespace MediaBrowser.Providers.Movies
public string UrlFormatString
{
get { return "http://www.themoviedb.org/collection/{0}"; }
get { return "https://www.themoviedb.org/collection/{0}"; }
}
public bool Supports(IHasProviderIds item)

@ -22,7 +22,7 @@ namespace MediaBrowser.Providers.Movies
/// <summary>
/// The updates URL
/// </summary>
private const string UpdatesUrl = "http://api.themoviedb.org/3/movie/changes?start_date={0}&api_key={1}&page={2}";
private const string UpdatesUrl = "https://api.themoviedb.org/3/movie/changes?start_date={0}&api_key={1}&page={2}";
/// <summary>
/// The _HTTP client

@ -26,7 +26,7 @@ namespace MediaBrowser.Providers.Music
{
internal readonly SemaphoreSlim FanArtResourcePool = new SemaphoreSlim(3, 3);
internal const string ApiKey = "5c6b04c68e904cfed1e6cbc9a9e683d4";
private const string FanArtBaseUrl = "http://webservice.fanart.tv/v3.1/music/{1}?api_key={0}";
private const string FanArtBaseUrl = "https://webservice.fanart.tv/v3.1/music/{1}?api_key={0}";
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
private readonly IServerConfigurationManager _config;

@ -19,7 +19,7 @@ namespace MediaBrowser.Providers.Music
{
class FanartUpdatesPostScanTask : ILibraryPostScanTask
{
private const string UpdatesUrl = "http://api.fanart.tv/webservice/newmusic/{0}/{1}/";
private const string UpdatesUrl = "https://api.fanart.tv/webservice/newmusic/{0}/{1}/";
/// <summary>
/// The _HTTP client

@ -42,7 +42,7 @@ namespace MediaBrowser.Providers.Music
if (!string.IsNullOrEmpty(releaseId))
{
url = string.Format("http://www.musicbrainz.org/ws/2/release/?query=reid:{0}", releaseId);
url = string.Format("https://www.musicbrainz.org/ws/2/release/?query=reid:{0}", releaseId);
}
else
{
@ -50,7 +50,7 @@ namespace MediaBrowser.Providers.Music
if (!string.IsNullOrWhiteSpace(artistMusicBrainzId))
{
url = string.Format("http://www.musicbrainz.org/ws/2/release/?query=\"{0}\" AND arid:{1}",
url = string.Format("https://www.musicbrainz.org/ws/2/release/?query=\"{0}\" AND arid:{1}",
WebUtility.UrlEncode(searchInfo.Name),
artistMusicBrainzId);
}
@ -58,7 +58,7 @@ namespace MediaBrowser.Providers.Music
{
isNameSearch = true;
url = string.Format("http://www.musicbrainz.org/ws/2/release/?query=\"{0}\" AND artist:\"{1}\"",
url = string.Format("https://www.musicbrainz.org/ws/2/release/?query=\"{0}\" AND artist:\"{1}\"",
WebUtility.UrlEncode(searchInfo.Name),
WebUtility.UrlEncode(searchInfo.GetAlbumArtist()));
}
@ -77,7 +77,7 @@ namespace MediaBrowser.Providers.Music
private IEnumerable<RemoteSearchResult> GetResultsFromResponse(XmlDocument doc)
{
var ns = new XmlNamespaceManager(doc.NameTable);
ns.AddNamespace("mb", "http://musicbrainz.org/ns/mmd-2.0#");
ns.AddNamespace("mb", "https://musicbrainz.org/ns/mmd-2.0#");