Use HTTPS for API requests: FanArt: http:// -> https:// (2)

This commit is contained in:
nfnty 2016-06-05 21:04:46 +02:00
parent aa5262de21
commit 12f10fd36a
4 changed files with 12 additions and 4 deletions

View file

@ -12,6 +12,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;
@ -151,6 +152,7 @@ namespace MediaBrowser.Providers.Music
} }
} }
private Regex _regex_http = new Regex("^http://");
private void PopulateImages(List<RemoteImageInfo> list, private void PopulateImages(List<RemoteImageInfo> list,
List<FanartArtistProvider.FanartArtistImage> images, List<FanartArtistProvider.FanartArtistImage> images,
ImageType type, ImageType type,
@ -178,7 +180,7 @@ namespace MediaBrowser.Providers.Music
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
}; };

View file

@ -14,6 +14,7 @@ using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Text.RegularExpressions;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using CommonIO; using CommonIO;
@ -149,6 +150,7 @@ namespace MediaBrowser.Providers.Music
PopulateImages(list, obj.musicarts, ImageType.Art, 500, 281); PopulateImages(list, obj.musicarts, ImageType.Art, 500, 281);
} }
private Regex _regex_http = new Regex("^http://");
private void PopulateImages(List<RemoteImageInfo> list, private void PopulateImages(List<RemoteImageInfo> list,
List<FanartArtistImage> images, List<FanartArtistImage> images,
ImageType type, ImageType type,
@ -176,7 +178,7 @@ namespace MediaBrowser.Providers.Music
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
}; };

View file

@ -15,6 +15,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;
@ -160,6 +161,7 @@ namespace MediaBrowser.Providers.TV
PopulateImages(list, obj.showbackground, ImageType.Backdrop, 1920, 1080, seasonNumber); PopulateImages(list, obj.showbackground, ImageType.Backdrop, 1920, 1080, seasonNumber);
} }
private Regex _regex_http = new Regex("^http://");
private void PopulateImages(List<RemoteImageInfo> list, private void PopulateImages(List<RemoteImageInfo> list,
List<FanartSeriesProvider.Image> images, List<FanartSeriesProvider.Image> images,
ImageType type, ImageType type,
@ -194,7 +196,7 @@ namespace MediaBrowser.Providers.TV
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
}; };

View file

@ -17,6 +17,7 @@ using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Text.RegularExpressions;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using CommonIO; using CommonIO;
@ -162,6 +163,7 @@ namespace MediaBrowser.Providers.TV
PopulateImages(list, obj.tvposter, ImageType.Primary, 1000, 1426); PopulateImages(list, obj.tvposter, ImageType.Primary, 1000, 1426);
} }
private Regex _regex_http = new Regex("^http://");
private void PopulateImages(List<RemoteImageInfo> list, private void PopulateImages(List<RemoteImageInfo> list,
List<Image> images, List<Image> images,
ImageType type, ImageType type,
@ -194,7 +196,7 @@ namespace MediaBrowser.Providers.TV
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
}; };