From 9e62eb53cb44ba6db0efde65e85e98197cf220f0 Mon Sep 17 00:00:00 2001 From: Glax Date: Fri, 16 May 2025 19:17:29 +0200 Subject: [PATCH] Log-Output for DownloadClient improved --- API/MangaDownloadClients/DownloadClient.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/API/MangaDownloadClients/DownloadClient.cs b/API/MangaDownloadClients/DownloadClient.cs index 7356fde..542d552 100644 --- a/API/MangaDownloadClients/DownloadClient.cs +++ b/API/MangaDownloadClients/DownloadClient.cs @@ -15,7 +15,7 @@ internal abstract class DownloadClient public RequestResult MakeRequest(string url, RequestType requestType, string? referrer = null, string? clickButton = null) { - Log.Debug($"Requesting {url}"); + Log.Debug($"Requesting {requestType} {url}"); if (!TrangaSettings.requestLimits.ContainsKey(requestType)) { return new RequestResult(HttpStatusCode.NotAcceptable, null, Stream.Null); @@ -30,7 +30,7 @@ internal abstract class DownloadClient LastExecutedRateLimit.TryAdd(requestType, now.Subtract(timeBetweenRequests)); TimeSpan rateLimitTimeout = timeBetweenRequests.Subtract(now.Subtract(LastExecutedRateLimit[requestType])); - Log.Debug($"Request limit {rateLimit}/Minute timeBetweenRequests: {timeBetweenRequests:ss'.'fffff} Timeout: {rateLimitTimeout:ss'.'fffff}"); + Log.Debug($"Request limit {requestType} {rateLimit}/Minute timeBetweenRequests: {timeBetweenRequests:ss'.'fffff} Timeout: {rateLimitTimeout:ss'.'fffff}"); if (rateLimitTimeout > TimeSpan.Zero) { @@ -39,6 +39,7 @@ internal abstract class DownloadClient RequestResult result = MakeRequestInternal(url, referrer, clickButton); LastExecutedRateLimit[requestType] = DateTime.UtcNow; + Log.Debug($"Result {url}: {result}"); return result; }