From 93ff4314059c3db908ae56168f433ed22c1889ac Mon Sep 17 00:00:00 2001 From: Carlos Date: Sat, 8 Sep 2018 11:39:49 -0400 Subject: [PATCH] mangadex fix global search for r18 (#483) --- src/all/mangadex/build.gradle | 4 ++-- .../tachiyomi/extension/all/mangadex/Mangadex.kt | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/all/mangadex/build.gradle b/src/all/mangadex/build.gradle index c8b7aeb6d..79d24b2e7 100644 --- a/src/all/mangadex/build.gradle +++ b/src/all/mangadex/build.gradle @@ -5,8 +5,8 @@ ext { appName = 'Tachiyomi: MangaDex' pkgNameSuffix = 'all.mangadex' extClass = '.MangadexFactory' - extVersionCode = 37 - extVersionSuffix = 37 + extVersionCode = 38 + extVersionSuffix = 38 libVersion = '1.2' } diff --git a/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/Mangadex.kt b/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/Mangadex.kt index aac4bdfc3..f98785037 100644 --- a/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/Mangadex.kt +++ b/src/all/mangadex/src/eu/kanade/tachiyomi/extension/all/mangadex/Mangadex.kt @@ -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) : Filter.Group("Genres", genres) - private class R18 : Filter.Select("R18+", arrayOf("Show all", "Show only", "Show none")) + private class R18 : Filter.Select("R18+", arrayOf("Default","Show all", "Show only", "Show none")) private class Demographic : Filter.Select("Demographic", arrayOf("All", "Shounen", "Shoujo", "Seinen", "Josei")) private class OriginalLanguage : Filter.Select("Original Language", SOURCE_LANG_LIST.map { it -> it.first }.toTypedArray())