[RU]Comx fix filters (#10069)

This commit is contained in:
e-shl 2021-12-10 23:22:10 +05:00 committed by GitHub
parent 0e0a8f2bde
commit 5966e7db61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 77 additions and 62 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'ComX' extName = 'ComX'
pkgNameSuffix = 'ru.comx' pkgNameSuffix = 'ru.comx'
extClass = '.ComX' extClass = '.ComX'
extVersionCode = 10 extVersionCode = 11
} }
dependencies { dependencies {

View File

@ -109,7 +109,7 @@ class ComX : ParsedHttpSource() {
} }
is PubList -> filter.state.forEach { publisher -> is PubList -> filter.state.forEach { publisher ->
if (publisher.state) { if (publisher.state) {
url.addQueryParameter("field[publisher][${publisher.id}]", 1.toString()) url.addQueryParameter("subCat[]", publisher.id)
} }
} }
is GenreList -> filter.state.forEach { genre -> is GenreList -> filter.state.forEach { genre ->
@ -246,7 +246,7 @@ class ComX : ParsedHttpSource() {
private class CheckFilter(name: String, val id: String) : Filter.CheckBox(name) private class CheckFilter(name: String, val id: String) : Filter.CheckBox(name)
private class TypeList(types: List<CheckFilter>) : Filter.Group<CheckFilter>("Тип выпуска", types) private class TypeList(types: List<CheckFilter>) : Filter.Group<CheckFilter>("Тип выпуска", types)
private class PubList(publishers: List<CheckFilter>) : Filter.Group<CheckFilter>("Издатели", publishers) private class PubList(publishers: List<CheckFilter>) : Filter.Group<CheckFilter>("Разделы", publishers)
private class GenreList(genres: List<CheckFilter>) : Filter.Group<CheckFilter>("Жанры", genres) private class GenreList(genres: List<CheckFilter>) : Filter.Group<CheckFilter>("Жанры", genres)
override fun getFilterList() = FilterList( override fun getFilterList() = FilterList(
@ -263,67 +263,82 @@ class ComX : ParsedHttpSource() {
) )
private fun getPubList() = listOf( private fun getPubList() = listOf(
CheckFilter("Amalgam Comics", "1"), CheckFilter("Marvel", "2"),
CheckFilter("Avatar Press", "2"), CheckFilter("DC Comics", "14"),
CheckFilter("Bongo", "3"), CheckFilter("Dark Horse", "7"),
CheckFilter("Boom! Studios", "4"), CheckFilter("IDW Publishing", "6"),
CheckFilter("DC Comics", "5"), CheckFilter("Image", "4"),
CheckFilter("DC/WildStorm", "6"), CheckFilter("Vertigo", "8"),
CheckFilter("Dark Horse Comics", "7"), CheckFilter("Dynamite Entertainment", "10"),
CheckFilter("Disney", "8"), CheckFilter("Wildstorm", "5"),
CheckFilter("Dynamite Entertainment", "9"), CheckFilter("Avatar Press", "11"),
CheckFilter("IDW Publishing", "10"), CheckFilter("Boom! Studios", "12"),
CheckFilter("Icon Comics", "11"), CheckFilter("Top Cow", "9"),
CheckFilter("Image Comics", "12"), CheckFilter("Oni Press", "13"),
CheckFilter("Marvel Comics", "13"), CheckFilter("Valiant", "15"),
CheckFilter("Marvel Knights", "14"), CheckFilter("Icon Comics", "16"),
CheckFilter("Max", "15"), CheckFilter("Manga", "3"),
CheckFilter("Mirage", "16"), CheckFilter("Manhua", "45"),
CheckFilter("Oni Press", "17"), CheckFilter("Manhwa", "44"),
CheckFilter("ShadowLine", "18"), CheckFilter("Разные комиксы", "18")
CheckFilter("Titan Comics", "19"),
CheckFilter("Top Cow", "20"),
CheckFilter("Ubisoft Entertainment", "21"),
CheckFilter("Valiant Comics", "22"),
CheckFilter("Vertigo", "23"),
CheckFilter("Viper Comics", "24"),
CheckFilter("Vortex", "25"),
CheckFilter("WildStorm", "26"),
CheckFilter("Zenescope Entertainment", "27"),
) )
private fun getGenreList() = listOf( private fun getGenreList() = listOf(
CheckFilter("Антиутопия", "1"), CheckFilter("Sci-Fi", "2"),
CheckFilter("Бандитский ситком", "2"), CheckFilter("Антиутопия", "3"),
CheckFilter("Боевик", "3"), CheckFilter("Апокалипсис", "4"),
CheckFilter("Вестерн", "4"), CheckFilter("Боевик", "5"),
CheckFilter("Детектив", "5"), CheckFilter("Боевые искусства", "6"),
CheckFilter("Драма", "6"), CheckFilter("Вампиры", "7"),
CheckFilter("История", "7"), CheckFilter("Вестерн", "8"),
CheckFilter("Киберпанк", "8"), CheckFilter("Военный", "9"),
CheckFilter("Комедия", "9"), CheckFilter("Детектив", "10"),
CheckFilter("Космоопера", "10"), CheckFilter("Драма", "11"),
CheckFilter("Криминал", "11"), CheckFilter("Зомби", "12"),
CheckFilter("МелоДрама", "12"), CheckFilter("Игры", "13"),
CheckFilter("Мистика", "13"), CheckFilter("Исекай", "14"),
CheckFilter("Нуар", "14"), CheckFilter("Исторический", "15"),
CheckFilter("Постапокалиптика", "15"), CheckFilter("Киберпанк", "16"),
CheckFilter("Приключения", "16"), CheckFilter("Комедия", "17"),
CheckFilter("Сверхъестественное", "17"), CheckFilter("Космоопера", "18"),
CheckFilter("Сказка", "18"), CheckFilter("Космос", "19"),
CheckFilter("Спорт", "19"), CheckFilter("Криминал", "20"),
CheckFilter("Стимпанк", "20"), CheckFilter("МелоДрама", "21"),
CheckFilter("Триллер", "21"), CheckFilter("Мистика", "22"),
CheckFilter("Ужасы", "22"), CheckFilter("Научная Фантастика", "23"),
CheckFilter("Фантастика", "23"), CheckFilter("Неотвратимость", "24"),
CheckFilter("Фэнтези", "24"), CheckFilter("Нуар", "25"),
CheckFilter("Черный юмор", "25"), CheckFilter("Паника", "26"),
CheckFilter("Экшн", "26"), CheckFilter("Пародия", "27"),
CheckFilter("Боевые искусства", "27"), CheckFilter("Повседневность", "28"),
CheckFilter("Научная Фантастика", "28"), CheckFilter("Постапокалиптика", "29"),
CheckFilter("Психоделика", "29"), CheckFilter("ПредательСредиНас", "30"),
CheckFilter("Психология", "30"), CheckFilter("Приключения", "31"),
CheckFilter("Романтика", "31"), CheckFilter("Путешествия во времени", "32"),
CheckFilter("Трагедия", "32"), CheckFilter("Сверхъестественное", "33"),
CheckFilter("Слэшер", "34"),
CheckFilter("Смерть", "35"),
CheckFilter("Супергерои", "36"),
CheckFilter("Супергероика", "37"),
CheckFilter("Сёнен", "38"),
CheckFilter("Тревога", "39"),
CheckFilter("Триллер", "40"),
CheckFilter("Ужасы", "41"),
CheckFilter("Фантасмагория", "42"),
CheckFilter("Фантастика", "43"),
CheckFilter("Фэнтези", "44"),
CheckFilter("Экшен", "45"),
CheckFilter("Экшн", "46"),
CheckFilter("Эротика", "47"),
CheckFilter("сэйнэн", "66"),
CheckFilter("сёдзё", "67"),
CheckFilter("сёнэн", "68"),
CheckFilter("сёнэн-ай", "69"),
CheckFilter("трагедия", "70"),
CheckFilter("фэнтези", "73"),
CheckFilter("школа", "74"),
CheckFilter("этти", "76"),
CheckFilter("яой", "77"),
) )
} }