Support resumable image downloads if supported by source (#3167)

Co-authored-by: MajorTanya <39014446+MajorTanya@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
Mohannad
2026-06-30 21:20:43 +03:00
committed by GitHub
parent a82ccea6f5
commit d8c3440d37
5 changed files with 43 additions and 20 deletions
@@ -404,8 +404,8 @@ abstract class HttpSource : CatalogueSource {
)
protected open fun imageUrlParse(response: Response): String = throw UnsupportedOperationException()
suspend fun getImage(page: Page): Response {
return client.newCachelessCallWithProgress(imageRequest(page), page)
suspend fun getImage(page: Page, existingSize: Long = 0L): Response {
return client.newCachelessCallWithProgress(imageRequest(page), page, existingSize)
.awaitSuccess()
}