mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-11 18:16:16 +00:00
Fixed missing manga pages when downloading (#586)
This commit is contained in:
@@ -232,12 +232,18 @@ class MangaDownloaderService : Service() {
|
||||
image.page,
|
||||
image.source
|
||||
)
|
||||
if (bitmap == null) {
|
||||
snackString("${task.chapter} - Retrying to download page ${index.ofLength(3)}, attempt ${retryCount + 1}.")
|
||||
}
|
||||
retryCount++
|
||||
}
|
||||
|
||||
if (bitmap != null) {
|
||||
saveToDisk("${index.ofLength(3)}.jpg", outputDir, bitmap)
|
||||
if (bitmap == null) {
|
||||
outputDir.deleteRecursively(this@MangaDownloaderService, false)
|
||||
throw Exception("${task.chapter} - Unable to download all pages after $retryCount attempts. Try again.")
|
||||
}
|
||||
|
||||
saveToDisk("${index.ofLength(3)}.jpg", outputDir, bitmap)
|
||||
farthest++
|
||||
|
||||
builder.setProgress(task.imageData.size, farthest, false)
|
||||
|
||||
@@ -474,7 +474,7 @@ open class MangaReadFragment : Fragment(), ScanlatorSelectionListener {
|
||||
scanlator = chapter.scanlator ?: "Unknown",
|
||||
imageData = images,
|
||||
sourceMedia = media,
|
||||
retries = 2,
|
||||
retries = 25,
|
||||
simultaneousDownloads = 2
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user