BlogTruyen: Wrap async call in try-catch (#5526)

add try catch
This commit is contained in:
bapeey 2024-10-15 01:59:50 -05:00 committed by GitHub
parent 17ae7c93c9
commit 8710b0bb99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -2,4 +2,4 @@ plugins {
id("lib-multisrc")
}
baseVersionCode = 2
baseVersionCode = 3

View File

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.multisrc.blogtruyen
import android.util.Log
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.Filter
@ -366,7 +367,11 @@ abstract class BlogTruyen(
)
Single.fromCallable {
client.newCall(request).execute().close()
try {
client.newCall(request).execute().close()
} catch (e: Exception) {
Log.e("BlogTruyen", "Error updating view count", e)
}
}
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.io())