Skip error for local manga list (close #1113, close #1115)

This commit is contained in:
Koitharu
2024-09-29 19:46:42 +03:00
committed by Mac135135
parent 150e3d554f
commit 8e8953b07f

View File

@@ -230,9 +230,12 @@ class LocalMangaRepository @Inject constructor(
val dispatcher = Dispatchers.IO.limitedParallelism(MAX_PARALLELISM)
for (file in files) {
launch(dispatcher) {
val m = LocalMangaInput.ofOrNull(file)?.getManga()
if (m != null) {
send(m)
runCatchingCancellable {
LocalMangaInput.ofOrNull(file)?.getManga()
}.onFailure { e ->
e.printStackTraceDebug()
}.onSuccess { m ->
if (m != null) send(m)
}
}
}