[Ru]Fix Mangalib added filters (#5839)

This commit is contained in:
Eugene 2021-02-13 22:59:39 +05:00 committed by GitHub
parent 34fb336c0d
commit 3fa9e9eb81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'MangaLib' extName = 'MangaLib'
pkgNameSuffix = 'ru.libmanga' pkgNameSuffix = 'ru.libmanga'
extClass = '.LibManga' extClass = '.LibManga'
extVersionCode = 32 extVersionCode = 33
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -297,10 +297,14 @@ class LibManga : ConfigurableSource, HttpSource() {
(if (filters.isEmpty()) getFilterList() else filters).forEach { filter -> (if (filters.isEmpty()) getFilterList() else filters).forEach { filter ->
when (filter) { when (filter) {
is CategoryList -> filter.state.forEach { category -> 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 -> 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 -> is GenreList -> filter.state.forEach { genre ->
if (genre.state != Filter.TriState.STATE_IGNORE) { if (genre.state != Filter.TriState.STATE_IGNORE) {
@ -395,7 +399,6 @@ class LibManga : ConfigurableSource, HttpSource() {
CheckFilter("OEL-манга", "4"), CheckFilter("OEL-манга", "4"),
CheckFilter("Манхва", "5"), CheckFilter("Манхва", "5"),
CheckFilter("Маньхуа", "6"), CheckFilter("Маньхуа", "6"),
CheckFilter("Сингл", "7"),
CheckFilter("Руманга", "8"), CheckFilter("Руманга", "8"),
CheckFilter("Комикс западный", "9") CheckFilter("Комикс западный", "9")
) )