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:
@@ -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,6 +305,7 @@ class LocalSource(
|
|||||||
.parseChapterNumber(manga.title, this.name, this.chapter_number.toDouble())
|
.parseChapterNumber(manga.title, this.name, this.chapter_number.toDouble())
|
||||||
.toFloat()
|
.toFloat()
|
||||||
|
|
||||||
|
try {
|
||||||
val format = Format.valueOf(chapterFile)
|
val format = Format.valueOf(chapterFile)
|
||||||
if (format is Format.Epub) {
|
if (format is Format.Epub) {
|
||||||
format.file.epubReader(context).use { epub ->
|
format.file.epubReader(context).use { epub ->
|
||||||
@@ -314,6 +316,11 @@ class LocalSource(
|
|||||||
setChapterDetailsFromComicInfoFile(stream, this)
|
setChapterDetailsFromComicInfoFile(stream, this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (e: CancellationException) {
|
||||||
|
throw e
|
||||||
|
} catch (e: Exception) {
|
||||||
|
logcat(LogPriority.ERROR, e) { "Failed to read metadata for ${chapterFile.name}" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.sortedWith { c1, c2 ->
|
.sortedWith { c1, c2 ->
|
||||||
|
|||||||
Reference in New Issue
Block a user