mirror of
https://github.com/mihonapp/mihon.git
synced 2026-10-16 13:48:09 -07:00
Keep listing local chapters when one archive can't be read (#3997)
Closes #3997 Fixes #2548 Co-authored-by: AddictToTheKey <addicttothekey@local>
This commit is contained in:
co-authored by
AddictToTheKey
parent
88d4071cce
commit
be44a81fb6
@@ -14,6 +14,7 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
|||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.model.SMangaUpdate
|
import eu.kanade.tachiyomi.source.model.SMangaUpdate
|
||||||
import eu.kanade.tachiyomi.util.lang.compareToCaseInsensitiveNaturalOrder
|
import eu.kanade.tachiyomi.util.lang.compareToCaseInsensitiveNaturalOrder
|
||||||
|
import kotlinx.coroutines.CancellationException
|
||||||
import kotlinx.coroutines.async
|
import kotlinx.coroutines.async
|
||||||
import kotlinx.coroutines.awaitAll
|
import kotlinx.coroutines.awaitAll
|
||||||
import kotlinx.coroutines.supervisorScope
|
import kotlinx.coroutines.supervisorScope
|
||||||
@@ -304,15 +305,21 @@ class LocalSource(
|
|||||||
.parseChapterNumber(manga.title, this.name, this.chapter_number.toDouble())
|
.parseChapterNumber(manga.title, this.name, this.chapter_number.toDouble())
|
||||||
.toFloat()
|
.toFloat()
|
||||||
|
|
||||||
val format = Format.valueOf(chapterFile)
|
try {
|
||||||
if (format is Format.Epub) {
|
val format = Format.valueOf(chapterFile)
|
||||||
format.file.epubReader(context).use { epub ->
|
if (format is Format.Epub) {
|
||||||
epub.fillMetadata(manga, this)
|
format.file.epubReader(context).use { epub ->
|
||||||
}
|
epub.fillMetadata(manga, this)
|
||||||
} else {
|
}
|
||||||
getComicInfoForChapter(chapterFile) { stream ->
|
} else {
|
||||||
setChapterDetailsFromComicInfoFile(stream, this)
|
getComicInfoForChapter(chapterFile) { stream ->
|
||||||
|
setChapterDetailsFromComicInfoFile(stream, this)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (e: CancellationException) {
|
||||||
|
throw e
|
||||||
|
} catch (e: Exception) {
|
||||||
|
logcat(LogPriority.ERROR, e) { "Failed to read metadata for ${chapterFile.name}" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user