Merge pull request #1291 from TheBestF22/FutureProofing-Local-indexes

Future-Proofing Local Storage by Updating Local Archive indexes/Padding for Pages and Chapters - devel branch
This commit is contained in:
Koitharu
2025-02-16 16:21:18 +02:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ class MangaIndex(source: String?) {
jo.put(KEY_UPLOAD_DATE, chapter.value.uploadDate)
jo.put(KEY_SCANLATOR, chapter.value.scanlator)
jo.put(KEY_BRANCH, chapter.value.branch)
jo.put(KEY_ENTRIES, "%08d_%03d\\d{3}".format(chapter.value.branch.hashCode(), chapter.index + 1))
jo.put(KEY_ENTRIES, "%08d_%04d\\d{4}".format(chapter.value.branch.hashCode(), chapter.index + 1))
jo.put(KEY_FILE, filename)
chapters.put(chapter.value.id.toString(), jo)
}

View File

@@ -162,6 +162,6 @@ class LocalMangaDirOutput(
companion object {
private const val FILENAME_PATTERN = "%08d_%03d%03d"
private const val FILENAME_PATTERN = "%08d_%04d%04d"
}
}

View File

@@ -118,7 +118,7 @@ class LocalMangaZipOutput(
companion object {
private const val FILENAME_PATTERN = "%08d_%03d%03d"
private const val FILENAME_PATTERN = "%08d_%04d%04d"
suspend fun filterChapters(file: File, manga: Manga, idsToRemove: Set<Long>) =
runInterruptible(Dispatchers.IO) {