diff --git a/src/all/nhentai/build.gradle b/src/all/nhentai/build.gradle index a8f017436..c354397ff 100644 --- a/src/all/nhentai/build.gradle +++ b/src/all/nhentai/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'NHentai' pkgNameSuffix = 'all.nhentai' extClass = '.NHFactory' - extVersionCode = 31 + extVersionCode = 32 isNsfw = true } diff --git a/src/all/nhentai/src/eu/kanade/tachiyomi/extension/all/nhentai/NHentai.kt b/src/all/nhentai/src/eu/kanade/tachiyomi/extension/all/nhentai/NHentai.kt index ec7dfc73c..c0dff84e3 100644 --- a/src/all/nhentai/src/eu/kanade/tachiyomi/extension/all/nhentai/NHentai.kt +++ b/src/all/nhentai/src/eu/kanade/tachiyomi/extension/all/nhentai/NHentai.kt @@ -115,7 +115,7 @@ open class NHentai( .asObservableSuccess() .map { response -> searchMangaByIdParse(response, id) } } - query.isQueryIdNumbers() -> { + query.toIntOrNull() != null -> { client.newCall(searchMangaByIdRequest(query)) .asObservableSuccess() .map { response -> searchMangaByIdParse(response, query) } @@ -124,12 +124,6 @@ open class NHentai( } } - // The website redirects for any number <= 400000 - private fun String.isQueryIdNumbers(): Boolean { - val int = this.toIntOrNull() ?: return false - return int <= 400000 - } - override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { val fixedQuery = query.ifEmpty { "\"\"" } val filterList = if (filters.isEmpty()) getFilterList() else filters