Fix downloads not working due to wrong file check (#3514)

The code as-is accepts _any_ non-.tmp file as a match for the given
page file.
Changing the condition to "not .tmp" AND (either page prefix pattern)
results in the correct behaviour and chapters download again.
This commit is contained in:
MajorTanya
2026-07-03 18:20:56 +02:00
committed by GitHub
parent 0772f72021
commit f3c6789dfb
@@ -606,8 +606,10 @@ class Downloader(
* @param pagePrefix Expected page prefix (e.g., "001") * @param pagePrefix Expected page prefix (e.g., "001")
*/ */
private fun isDownloadedPageImage(fileName: String, pagePrefix: String): Boolean = private fun isDownloadedPageImage(fileName: String, pagePrefix: String): Boolean =
!fileName.endsWith(".tmp") || fileName.startsWith("$pagePrefix.") || !fileName.endsWith(".tmp") && (
fileName.startsWith("$pagePrefix.") ||
fileName.startsWith("${pagePrefix}__001.") fileName.startsWith("${pagePrefix}__001.")
)
/** /**
* Archive the chapter pages as a CBZ. * Archive the chapter pages as a CBZ.