#62 even more debug logging

This commit is contained in:
glax 2023-10-03 20:38:45 +02:00
parent c69dd22ecf
commit 73492d8102
2 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,7 @@ internal class ChromiumDownloadClient : DownloadClient
{
IPage page = this.browser!.NewPageAsync().Result;
IResponse response = page.GoToAsync(url, WaitUntilNavigation.DOMContentLoaded).Result;
Log("Page loaded.");
Stream stream = Stream.Null;
HtmlDocument? document = null;
@ -83,7 +84,7 @@ internal class ChromiumDownloadClient : DownloadClient
page.CloseAsync();
return new RequestResult(HttpStatusCode.InternalServerError, null, Stream.Null);
}
page.CloseAsync();
return new RequestResult(response.Status, document, stream, false, "");
}

View File

@ -217,6 +217,7 @@ public abstract class MangaConnector : GlobalBase
string extension = split[^1];
Log($"Downloading image {chapter + 1:000}/{imageUrls.Length:000}"); //TODO
HttpStatusCode status = DownloadImage(imageUrl, Path.Join(tempFolder, $"{chapter++}.{extension}"), requestType, referrer);
Log($"{saveArchiveFilePath} {chapter + 1:000}/{imageUrls.Length:000} {status}");
if ((int)status < 200 || (int)status >= 300)
{
progressToken?.Complete();