diff --git a/src/all/mangadex/build.gradle b/src/all/mangadex/build.gradle index 8d08f159a..8d93d0209 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 = 25 - extVersionSuffix = 25 + extVersionCode = 26 + extVersionSuffix = 26 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 4698b4b68..3b493e0d9 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 @@ -165,12 +165,17 @@ open class Mangadex(override val lang: String, private val internalLang: String, filters.forEach { filter -> when (filter) { is TextField -> url.addQueryParameter(filter.key, filter.state) + is Demographic -> { + if (filter.state != 0) { + url.addQueryParameter("demo", filter.state.toString()) + } + } } } + if (genres.isNotEmpty()) { url.addQueryParameter("genres", genres.joinToString(",")) } - return GET(url.toString(), headers) } @@ -389,11 +394,13 @@ open class Mangadex(override val lang: String, private val internalLang: String, private class Genre(val id: String, name: String) : Filter.CheckBox(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 Demographic : Filter.Select("Demographic", arrayOf("All", "Shounen", "Shoujo", "Seinen", "Josei")) override fun getFilterList() = FilterList( TextField("Author", "author"), TextField("Artist", "artist"), R18(), + Demographic(), GenreList(getGenreList()) )