diff --git a/src/all/hentaicosplay/build.gradle b/src/all/hentaicosplay/build.gradle index a211acb5c..42591b4e1 100644 --- a/src/all/hentaicosplay/build.gradle +++ b/src/all/hentaicosplay/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'Hentai Cosplay' extClass = '.HentaiCosplay' - extVersionCode = 2 + extVersionCode = 3 isNsfw = true } diff --git a/src/all/hentaicosplay/src/eu/kanade/tachiyomi/extension/all/hentaicosplay/HentaiCosplay.kt b/src/all/hentaicosplay/src/eu/kanade/tachiyomi/extension/all/hentaicosplay/HentaiCosplay.kt index d21b677cf..88869094b 100644 --- a/src/all/hentaicosplay/src/eu/kanade/tachiyomi/extension/all/hentaicosplay/HentaiCosplay.kt +++ b/src/all/hentaicosplay/src/eu/kanade/tachiyomi/extension/all/hentaicosplay/HentaiCosplay.kt @@ -138,21 +138,23 @@ class HentaiCosplay : HttpSource() { private fun fetchTags() { Single.fromCallable { - client.newCall(GET("$baseUrl/ranking-tag/", headers)) - .execute().asJsoup() - .run { - tagCache = buildList { - add(Pair("", "")) - select("#tags a").map { - Pair( - it.text() - .replace(tagNumRegex, "") - .trim(), - it.attr("href"), - ).let(::add) + runCatching { + client.newCall(GET("$baseUrl/ranking-tag/", headers)) + .execute().asJsoup() + .run { + tagCache = buildList { + add(Pair("", "")) + select("#tags a").map { + Pair( + it.text() + .replace(tagNumRegex, "") + .trim(), + it.attr("href"), + ).let(::add) + } } } - } + } } .subscribeOn(Schedulers.io()) .observeOn(Schedulers.io()) diff --git a/src/vi/truyengihot/build.gradle b/src/vi/truyengihot/build.gradle index a42783509..d7573eeec 100644 --- a/src/vi/truyengihot/build.gradle +++ b/src/vi/truyengihot/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'TruyenGiHot' extClass = '.TruyenGiHot' - extVersionCode = 4 + extVersionCode = 5 isNsfw = true } diff --git a/src/vi/truyengihot/src/eu/kanade/tachiyomi/extension/vi/truyengihot/TruyenGiHot.kt b/src/vi/truyengihot/src/eu/kanade/tachiyomi/extension/vi/truyengihot/TruyenGiHot.kt index fdb35e096..79dd8dd8d 100644 --- a/src/vi/truyengihot/src/eu/kanade/tachiyomi/extension/vi/truyengihot/TruyenGiHot.kt +++ b/src/vi/truyengihot/src/eu/kanade/tachiyomi/extension/vi/truyengihot/TruyenGiHot.kt @@ -285,19 +285,21 @@ class TruyenGiHot : ParsedHttpSource() { } Single.fromCallable { - val document = client.newCall(GET("$baseUrl/danh-sach-truyen.html", headers)).execute().asJsoup() + runCatching { + val document = client.newCall(GET("$baseUrl/danh-sach-truyen.html", headers)).execute().asJsoup() - val result = runCatching { - tags = TruyenGiHotUtils.parseThemes(document.selectFirst("#contentTag")!!) - themes = TruyenGiHotUtils.parseThemes(document.selectFirst("#contentTheme")!!) - scanlators = TruyenGiHotUtils.parseOptions(document.selectFirst("#contentGroup")!!) - } - .onFailure { - Log.e("TruyenGiHot", "Could not fetch filtering options", it) + val result = runCatching { + tags = TruyenGiHotUtils.parseThemes(document.selectFirst("#contentTag")!!) + themes = TruyenGiHotUtils.parseThemes(document.selectFirst("#contentTheme")!!) + scanlators = TruyenGiHotUtils.parseOptions(document.selectFirst("#contentGroup")!!) } + .onFailure { + Log.e("TruyenGiHot", "Could not fetch filtering options", it) + } - fetchFiltersFailed = result.isFailure - fetchFiltersAttempts++ + fetchFiltersFailed = result.isFailure + fetchFiltersAttempts++ + } } .subscribeOn(Schedulers.io()) .observeOn(Schedulers.io())