1
This commit is contained in:
@@ -19,12 +19,15 @@ public class ChineseNfoRegistry : Registry, IChineseNfoRegistry
|
||||
_configuration = configuration;
|
||||
_logger = logger;
|
||||
|
||||
var httpClientHandler = new HttpClientHandler();
|
||||
|
||||
var proxyAddress = _configuration["ChineseNfo:HttpProxy"];
|
||||
var httpClientHandler = new HttpClientHandler
|
||||
|
||||
if(string.IsNullOrEmpty(proxyAddress) == false)
|
||||
{
|
||||
Proxy = string.IsNullOrEmpty(proxyAddress) ? null : new WebProxy(proxyAddress, false),
|
||||
UseProxy = !string.IsNullOrEmpty(proxyAddress)
|
||||
};
|
||||
httpClientHandler.Proxy = string.IsNullOrEmpty(proxyAddress) ? null : new WebProxy(proxyAddress, false);
|
||||
httpClientHandler.UseProxy = !string.IsNullOrEmpty(proxyAddress);
|
||||
}
|
||||
|
||||
_client = new HttpClient(httpClientHandler);
|
||||
_client.BaseAddress = new Uri("https://api.themoviedb.org");
|
||||
|
||||
Reference in New Issue
Block a user