mirror of
https://github.com/C9Glax/tranga.git
synced 2025-10-11 05:09:49 +02:00
Fix #468 failed downloads (Task cancelled) results in empty chapter archive
Some checks are pending
Docker Image CI / build (push) Waiting to run
Some checks are pending
Docker Image CI / build (push) Waiting to run
This commit is contained in:
@@ -84,4 +84,10 @@ public abstract class MangaConnector(string name, string[] supportedLanguages, s
|
||||
|
||||
return filename.CleanNameForWindows();
|
||||
}
|
||||
|
||||
public async Task<Stream?> DownloadImage(string imageUrl, CancellationToken ct)
|
||||
{
|
||||
HttpResponseMessage requestResult = await downloadClient.MakeRequest(imageUrl, RequestType.MangaImage, cancellationToken: ct);
|
||||
return requestResult.IsSuccessStatusCode ? await requestResult.Content.ReadAsStreamAsync(ct) : null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user