nhentai remove id check (#11721)
This commit is contained in:
parent
ea48dbc870
commit
3102383317
|
@ -5,7 +5,7 @@ ext {
|
|||
extName = 'NHentai'
|
||||
pkgNameSuffix = 'all.nhentai'
|
||||
extClass = '.NHFactory'
|
||||
extVersionCode = 31
|
||||
extVersionCode = 32
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue