mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-03 10:54:38 -05:00
Fix CBZ download bug for newly added mangas in Library (#499)
This commit is contained in:
@@ -33,12 +33,13 @@ class ArchiveProvider(mangaId: Int, chapterId: Int) : DownloadedFilesProvider(ma
|
|||||||
val chapterFolder = File(chapterDir)
|
val chapterFolder = File(chapterDir)
|
||||||
if (outputFile.exists()) handleExistingCbzFile(outputFile, chapterFolder)
|
if (outputFile.exists()) handleExistingCbzFile(outputFile, chapterFolder)
|
||||||
|
|
||||||
|
|
||||||
|
FolderProvider(mangaId, chapterId).download(download, scope, step)
|
||||||
|
|
||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
outputFile.createNewFile()
|
outputFile.createNewFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
FolderProvider(mangaId, chapterId).download(download, scope, step)
|
|
||||||
|
|
||||||
ZipOutputStream(outputFile.outputStream()).use { zipOut ->
|
ZipOutputStream(outputFile.outputStream()).use { zipOut ->
|
||||||
if (chapterFolder.isDirectory) {
|
if (chapterFolder.isDirectory) {
|
||||||
chapterFolder.listFiles()?.sortedBy { it.name }?.forEach {
|
chapterFolder.listFiles()?.sortedBy { it.name }?.forEach {
|
||||||
|
|||||||
Reference in New Issue
Block a user