mangadex fix global search for r18 (#483)

This commit is contained in:
Carlos 2018-09-08 11:39:49 -04:00 committed by GitHub
parent 4654ef0f5b
commit 93ff431405
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -5,8 +5,8 @@ ext {
appName = 'Tachiyomi: MangaDex'
pkgNameSuffix = 'all.mangadex'
extClass = '.MangadexFactory'
extVersionCode = 37
extVersionSuffix = 37
extVersionCode = 38
extVersionSuffix = 38
libVersion = '1.2'
}

View File

@ -133,14 +133,15 @@ open class Mangadex(override val lang: String, private val internalLang: String,
when (filter) {
is R18 -> {
return when (filter.state) {
1 -> clientBuilder(ONLY_R18)
2 -> clientBuilder(NO_R18)
else -> clientBuilder(ALL)
1 -> clientBuilder(ALL)
2 -> clientBuilder(ONLY_R18)
3 -> clientBuilder(NO_R18)
else -> clientBuilder()
}
}
}
}
return clientBuilder(ALL)
return clientBuilder()
}
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
@ -413,7 +414,7 @@ open class Mangadex(override val lang: String, private val internalLang: String,
private class TextField(name: String, val key: String) : Filter.Text(name)
private class Genre(val id: String, name: String) : Filter.TriState(name)
private class GenreList(genres: List<Genre>) : Filter.Group<Genre>("Genres", genres)
private class R18 : Filter.Select<String>("R18+", arrayOf("Show all", "Show only", "Show none"))
private class R18 : Filter.Select<String>("R18+", arrayOf("Default","Show all", "Show only", "Show none"))
private class Demographic : Filter.Select<String>("Demographic", arrayOf("All", "Shounen", "Shoujo", "Seinen", "Josei"))
private class OriginalLanguage : Filter.Select<String>("Original Language", SOURCE_LANG_LIST.map { it -> it.first }.toTypedArray())