Run getRecs in IO

This commit is contained in:
Jobobby04 2020-11-30 13:19:28 -05:00
parent dacc5502fc
commit 5e5b155992

View File

@ -198,7 +198,7 @@ open class RecommendsPager(
.asSequence() .asSequence()
.map { (key, api) -> .map { (key, api) ->
try { try {
val recs = runBlocking { api.getRecsBySearch(manga.originalTitle) } val recs = runBlocking(Dispatchers.IO) { api.getRecsBySearch(manga.originalTitle) }
Timber.tag("RECOMMENDATIONS").d("%s > Results: %s", key, recs.count()) Timber.tag("RECOMMENDATIONS").d("%s > Results: %s", key, recs.count())
recs recs
} catch (e: Exception) { } catch (e: Exception) {