* Fix for #14276 * increase versionCode * fixed issue with requests going to page 1 * ehentai filter fix * added comments and removed logging * update gradle * Update src/all/ehentai/src/eu/kanade/tachiyomi/extension/all/ehentai/EHentai.kt Co-authored-by: Two-Ai <81279822+Two-Ai@users.noreply.github.com> * Update src/all/ehentai/src/eu/kanade/tachiyomi/extension/all/ehentai/EHentai.kt Co-authored-by: Two-Ai <81279822+Two-Ai@users.noreply.github.com> Co-authored-by: Alec <alec.l@digipen.edu> Co-authored-by: Two-Ai <81279822+Two-Ai@users.noreply.github.com>
This commit is contained in:
parent
a556207c7a
commit
777f677175
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'E-Hentai'
|
extName = 'E-Hentai'
|
||||||
pkgNameSuffix = 'all.ehentai'
|
pkgNameSuffix = 'all.ehentai'
|
||||||
extClass = '.EHFactory'
|
extClass = '.EHFactory'
|
||||||
extVersionCode = 19
|
extVersionCode = 20
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,9 +165,22 @@ abstract class EHentai(
|
||||||
.joinToString(",")
|
.joinToString(",")
|
||||||
.let { if (it.isNotEmpty()) ",$it" else it }
|
.let { if (it.isNotEmpty()) ",$it" else it }
|
||||||
uri.appendQueryParameter("f_search", modifiedQuery)
|
uri.appendQueryParameter("f_search", modifiedQuery)
|
||||||
|
//when attempting to search with no genres selected, will auto select all genres
|
||||||
|
filters.filterIsInstance<GenreGroup>().firstOrNull()?.state?.let {
|
||||||
|
//variable to to check is any genres are selected
|
||||||
|
val check = it.any { option -> option.state } // or it.any(GenreOption::state)
|
||||||
|
//if no genres are selected by the user set all genres to on
|
||||||
|
if (!check) {
|
||||||
|
for (i in it) {
|
||||||
|
(i as GenreOption).state = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
filters.forEach {
|
filters.forEach {
|
||||||
if (it is UriFilter) it.addToUri(uri)
|
if (it is UriFilter) it.addToUri(uri)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uri.toString().contains("f_spf") || uri.toString().contains("f_spt")) {
|
if (uri.toString().contains("f_spf") || uri.toString().contains("f_spt")) {
|
||||||
if (page > 1) uri.appendQueryParameter("from", lastMangaId)
|
if (page > 1) uri.appendQueryParameter("from", lastMangaId)
|
||||||
}
|
}
|
||||||
|
@ -182,7 +195,7 @@ abstract class EHentai(
|
||||||
override fun latestUpdatesParse(response: Response) = genericMangaParse(response)
|
override fun latestUpdatesParse(response: Response) = genericMangaParse(response)
|
||||||
|
|
||||||
private fun exGet(url: String, page: Int? = null, additionalHeaders: Headers? = null, cache: Boolean = true): Request {
|
private fun exGet(url: String, page: Int? = null, additionalHeaders: Headers? = null, cache: Boolean = true): Request {
|
||||||
//pages no longer exist, if app attempts to go to the first page after a request, do not include the page append
|
// pages no longer exist, if app attempts to go to the first page after a request, do not include the page append
|
||||||
val pageIndex = if (page == 1) null else page
|
val pageIndex = if (page == 1) null else page
|
||||||
return GET(
|
return GET(
|
||||||
pageIndex?.let {
|
pageIndex?.let {
|
||||||
|
@ -373,7 +386,7 @@ abstract class EHentai(
|
||||||
EnforceLanguageFilter(getEnforceLanguagePref()),
|
EnforceLanguageFilter(getEnforceLanguagePref()),
|
||||||
Watched(),
|
Watched(),
|
||||||
GenreGroup(),
|
GenreGroup(),
|
||||||
TagFilter("Misc Tags", triStateBoxesFrom(miscTags), ""),
|
TagFilter("Misc Tags", triStateBoxesFrom(miscTags), "other"),
|
||||||
TagFilter("Female Tags", triStateBoxesFrom(femaleTags), "female"),
|
TagFilter("Female Tags", triStateBoxesFrom(femaleTags), "female"),
|
||||||
TagFilter("Male Tags", triStateBoxesFrom(maleTags), "male"),
|
TagFilter("Male Tags", triStateBoxesFrom(maleTags), "male"),
|
||||||
AdvancedGroup()
|
AdvancedGroup()
|
||||||
|
|
Loading…
Reference in New Issue