diff --git a/src/all/nhentai/build.gradle b/src/all/nhentai/build.gradle index 1852c4cd6..95e27664e 100644 --- a/src/all/nhentai/build.gradle +++ b/src/all/nhentai/build.gradle @@ -1,7 +1,7 @@ ext { extName = 'NHentai' extClass = '.NHFactory' - extVersionCode = 45 + extVersionCode = 46 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 22c0ccbd0..b1ad0849f 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 @@ -140,7 +140,6 @@ open class NHentai( val nhLangSearch = if (nhLang.isBlank()) "" else "language:$nhLang " val advQuery = combineQuery(filterList) val favoriteFilter = filterList.findInstance() - val isOkayToSort = filterList.findInstance()?.state?.isBlank() ?: true val offsetPage = filterList.findInstance()?.state?.toIntOrNull()?.plus(page) ?: page @@ -157,10 +156,8 @@ open class NHentai( .addQueryParameter("q", "$query $nhLangSearch$advQuery".ifBlank { "\"\"" }) .addQueryParameter("page", offsetPage.toString()) - if (isOkayToSort) { - filterList.findInstance()?.let { f -> - url.addQueryParameter("sort", f.toUriPart()) - } + filterList.findInstance()?.let { f -> + url.addQueryParameter("sort", f.toUriPart()) } return GET(url.build(), headers) @@ -173,8 +170,13 @@ open class NHentai( .map(String::trim) .filterNot(String::isBlank) .forEach { tag -> + val y = !(filter.name == "Pages" || filter.name == "Uploaded") if (tag.startsWith("-")) append("-") - append(filter.name, ":\"", tag.removePrefix("-"), "\" ") + append(filter.name, ':') + if (y) append('"') + append(tag.removePrefix("-")) + if (y) append('"') + append(" ") } } }