mirror of
https://github.com/91270/MeiamSubtitles.git
synced 2026-02-02 18:19:50 +08:00
增加请求超时时间
This commit is contained in:
@@ -9,8 +9,8 @@ namespace Emby.Subtitle.DevTool
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine(ComputeFileHash($"X:\\Favorites\\Movie\\八佰 (2020)\\八佰 (2020) 1080p TrueHD.mkv"));
|
||||
//Console.WriteLine(ComputeFileHash($"D:\\Documents\\Downloads\\testidx.avi"));
|
||||
//Console.WriteLine(ComputeFileHash($"X:\\Favorites\\Movie\\八佰 (2020)\\八佰 (2020) 1080p TrueHD.mkv"));
|
||||
Console.WriteLine(ComputeFileHash($"D:\\Documents\\Downloads\\testidx.avi"));
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
|
||||
@@ -85,8 +85,9 @@ namespace Emby.MeiamSub.Shooter
|
||||
|
||||
HttpRequestOptions options = new HttpRequestOptions
|
||||
{
|
||||
Url = $"http://shooter.cn/api/subapi.php",
|
||||
Url = $"http://www.shooter.cn/api/subapi.php",
|
||||
UserAgent = "Emby.MeiamSub.Shooter",
|
||||
TimeoutMs = 30000,
|
||||
AcceptHeader = "*/*",
|
||||
};
|
||||
|
||||
@@ -179,7 +180,10 @@ namespace Emby.MeiamSub.Shooter
|
||||
|
||||
var response = await _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
Url = downloadSub.Url
|
||||
Url = downloadSub.Url,
|
||||
UserAgent = "Emby.MeiamSub.Shooter",
|
||||
TimeoutMs = 30000,
|
||||
AcceptHeader = "*/*",
|
||||
});
|
||||
|
||||
_logger.Debug($"MeiamSub.Shooter DownloadSub | Response -> { response.StatusCode }");
|
||||
|
||||
@@ -83,7 +83,10 @@ namespace Emby.MeiamSub.Thunder
|
||||
|
||||
var response = await _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
Url = $"http://sub.xmp.sandai.net:8000/subxl/{cid}.json"
|
||||
Url = $"http://sub.xmp.sandai.net:8000/subxl/{cid}.json",
|
||||
UserAgent = "Emby.MeiamSub.Thunder",
|
||||
TimeoutMs = 30000,
|
||||
AcceptHeader = "*/*",
|
||||
});
|
||||
|
||||
_logger.Debug($"MeiamSub.Thunder Search | Response -> { _jsonSerializer.SerializeToString(response) }");
|
||||
@@ -159,7 +162,10 @@ namespace Emby.MeiamSub.Thunder
|
||||
|
||||
var response = await _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
Url = downloadSub.Url
|
||||
Url = downloadSub.Url,
|
||||
UserAgent = "Emby.MeiamSub.Thunder",
|
||||
TimeoutMs = 30000,
|
||||
AcceptHeader = "*/*",
|
||||
});
|
||||
|
||||
_logger.Debug($"MeiamSub.Thunder DownloadSub | Response -> { response.StatusCode }");
|
||||
|
||||
Reference in New Issue
Block a user