From 3fa9e9eb81f163897baf3cf0058e042ed9ab5b00 Mon Sep 17 00:00:00 2001 From: Eugene <35057681+e-shl@users.noreply.github.com> Date: Sat, 13 Feb 2021 22:59:39 +0500 Subject: [PATCH] [Ru]Fix Mangalib added filters (#5839) --- src/ru/libmanga/build.gradle | 2 +- .../kanade/tachiyomi/extension/ru/libmanga/LibManga.kt | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/ru/libmanga/build.gradle b/src/ru/libmanga/build.gradle index 945fdd1a7..4175b2230 100644 --- a/src/ru/libmanga/build.gradle +++ b/src/ru/libmanga/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'MangaLib' pkgNameSuffix = 'ru.libmanga' extClass = '.LibManga' - extVersionCode = 32 + extVersionCode = 33 libVersion = '1.2' } diff --git a/src/ru/libmanga/src/eu/kanade/tachiyomi/extension/ru/libmanga/LibManga.kt b/src/ru/libmanga/src/eu/kanade/tachiyomi/extension/ru/libmanga/LibManga.kt index da906cec2..3236e79d6 100644 --- a/src/ru/libmanga/src/eu/kanade/tachiyomi/extension/ru/libmanga/LibManga.kt +++ b/src/ru/libmanga/src/eu/kanade/tachiyomi/extension/ru/libmanga/LibManga.kt @@ -297,10 +297,14 @@ class LibManga : ConfigurableSource, HttpSource() { (if (filters.isEmpty()) getFilterList() else filters).forEach { filter -> when (filter) { is CategoryList -> filter.state.forEach { category -> - url.addQueryParameter("types[]", category.id) + if (category.state) { + url.addQueryParameter("types[]", category.id) + } } is StatusList -> filter.state.forEach { status -> - url.addQueryParameter("status[]", status.id) + if (status.state) { + url.addQueryParameter("status[]", status.id) + } } is GenreList -> filter.state.forEach { genre -> if (genre.state != Filter.TriState.STATE_IGNORE) { @@ -395,7 +399,6 @@ class LibManga : ConfigurableSource, HttpSource() { CheckFilter("OEL-манга", "4"), CheckFilter("Манхва", "5"), CheckFilter("Маньхуа", "6"), - CheckFilter("Сингл", "7"), CheckFilter("Руманга", "8"), CheckFilter("Комикс западный", "9") )