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