Updated domains, added filters for Gogoanime (#1159)
This commit is contained in:
@ -5,7 +5,7 @@ ext {
|
|||||||
extName = 'Gogoanime'
|
extName = 'Gogoanime'
|
||||||
pkgNameSuffix = 'en.gogoanime'
|
pkgNameSuffix = 'en.gogoanime'
|
||||||
extClass = '.GogoAnime'
|
extClass = '.GogoAnime'
|
||||||
extVersionCode = 52
|
extVersionCode = 53
|
||||||
libVersion = '13'
|
libVersion = '13'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,10 +142,14 @@ class GogoAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||||||
override fun searchAnimeRequest(page: Int, query: String, filters: AnimeFilterList): Request {
|
override fun searchAnimeRequest(page: Int, query: String, filters: AnimeFilterList): Request {
|
||||||
val filterList = if (filters.isEmpty()) getFilterList() else filters
|
val filterList = if (filters.isEmpty()) getFilterList() else filters
|
||||||
val genreFilter = filterList.find { it is GenreFilter } as GenreFilter
|
val genreFilter = filterList.find { it is GenreFilter } as GenreFilter
|
||||||
|
val recentFilter = filterList.find { it is RecentFilter } as RecentFilter
|
||||||
|
val seasonFilter = filterList.find { it is SeasonFilter } as SeasonFilter
|
||||||
|
|
||||||
return when {
|
return when {
|
||||||
query.isNotBlank() -> GET("$baseUrl/search.html?keyword=$query&page=$page", headers)
|
query.isNotBlank() -> GET("$baseUrl/search.html?keyword=$query&page=$page", headers)
|
||||||
genreFilter.state != 0 -> GET("$baseUrl/genre/${genreFilter.toUriPart()}?page=$page")
|
genreFilter.state != 0 -> GET("$baseUrl/genre/${genreFilter.toUriPart()}?page=$page")
|
||||||
|
recentFilter.state != 0 -> GET("https://ajax.gogo-load.com/ajax/page-recent-release.html?page=$page&type=${recentFilter.toUriPart()}")
|
||||||
|
seasonFilter.state != 0 -> GET("$baseUrl/${seasonFilter.toUriPart()}?page=$page", headers)
|
||||||
else -> GET("$baseUrl/popular.html?page=$page")
|
else -> GET("$baseUrl/popular.html?page=$page")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -198,9 +202,9 @@ class GogoAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||||||
val domainPref = ListPreference(screen.context).apply {
|
val domainPref = ListPreference(screen.context).apply {
|
||||||
key = "preferred_domain"
|
key = "preferred_domain"
|
||||||
title = "Preferred domain (requires app restart)"
|
title = "Preferred domain (requires app restart)"
|
||||||
entries = arrayOf("gogoanime.lu", "gogoanime.gg")
|
entries = arrayOf("gogoanime.tel", "gogoanime.ar")
|
||||||
entryValues = arrayOf("https://gogoanime.lu", "https://gogoanime.gg")
|
entryValues = arrayOf("https://gogoanime.tel", "https://gogoanime.ar")
|
||||||
setDefaultValue("https://gogoanime.lu")
|
setDefaultValue("https://gogoanime.tel")
|
||||||
summary = "%s"
|
summary = "%s"
|
||||||
|
|
||||||
setOnPreferenceChangeListener { _, newValue ->
|
setOnPreferenceChangeListener { _, newValue ->
|
||||||
@ -248,7 +252,9 @@ class GogoAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||||||
// Filters
|
// Filters
|
||||||
override fun getFilterList(): AnimeFilterList = AnimeFilterList(
|
override fun getFilterList(): AnimeFilterList = AnimeFilterList(
|
||||||
AnimeFilter.Header("Text search ignores filters"),
|
AnimeFilter.Header("Text search ignores filters"),
|
||||||
GenreFilter()
|
GenreFilter(),
|
||||||
|
RecentFilter(),
|
||||||
|
SeasonFilter()
|
||||||
)
|
)
|
||||||
|
|
||||||
private class GenreFilter : UriPartFilter(
|
private class GenreFilter : UriPartFilter(
|
||||||
@ -256,34 +262,61 @@ class GogoAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||||||
arrayOf(
|
arrayOf(
|
||||||
Pair("<select>", ""),
|
Pair("<select>", ""),
|
||||||
Pair("Action", "action"),
|
Pair("Action", "action"),
|
||||||
|
Pair("Adult Cast", "adult-cast"),
|
||||||
Pair("Adventure", "adventure"),
|
Pair("Adventure", "adventure"),
|
||||||
|
Pair("Anthropomorphic", "anthropomorphic"),
|
||||||
|
Pair("Avant Garde", "avant-garde"),
|
||||||
|
Pair("Boys Love", "shounen-ai"),
|
||||||
Pair("Cars", "cars"),
|
Pair("Cars", "cars"),
|
||||||
|
Pair("CGDCT", "cgdct"),
|
||||||
|
Pair("Childcare", "childcare"),
|
||||||
Pair("Comedy", "comedy"),
|
Pair("Comedy", "comedy"),
|
||||||
|
Pair("Comic", "comic"),
|
||||||
Pair("Crime", "crime"),
|
Pair("Crime", "crime"),
|
||||||
|
Pair("Crossdressing", "crossdressing"),
|
||||||
|
Pair("Delinquents", "delinquents"),
|
||||||
Pair("Dementia", "dementia"),
|
Pair("Dementia", "dementia"),
|
||||||
Pair("Demons", "demons"),
|
Pair("Demons", "demons"),
|
||||||
|
Pair("Detective", "detective"),
|
||||||
Pair("Drama", "drama"),
|
Pair("Drama", "drama"),
|
||||||
Pair("Dub", "dub"),
|
Pair("Dub", "dub"),
|
||||||
Pair("Ecchi", "ecchi"),
|
Pair("Ecchi", "ecchi"),
|
||||||
|
Pair("Erotica", "erotica"),
|
||||||
Pair("Family", "family"),
|
Pair("Family", "family"),
|
||||||
Pair("Fantasy", "fantasy"),
|
Pair("Fantasy", "fantasy"),
|
||||||
|
Pair("Gag Humor", "gag-humor"),
|
||||||
Pair("Game", "game"),
|
Pair("Game", "game"),
|
||||||
|
Pair("Gender Bender", "gender-bender"),
|
||||||
|
Pair("Gore", "gore"),
|
||||||
|
Pair("Gourmet", "gourmet"),
|
||||||
Pair("Harem", "harem"),
|
Pair("Harem", "harem"),
|
||||||
|
Pair("Hentai", "hentai"),
|
||||||
|
Pair("High Stakes Game", "high-stakes-game"),
|
||||||
Pair("Historical", "historical"),
|
Pair("Historical", "historical"),
|
||||||
Pair("Horror", "horror"),
|
Pair("Horror", "horror"),
|
||||||
|
Pair("Isekai", "isekai"),
|
||||||
|
Pair("Iyashikei", "iyashikei"),
|
||||||
Pair("Josei", "josei"),
|
Pair("Josei", "josei"),
|
||||||
Pair("Kids", "kids"),
|
Pair("Kids", "kids"),
|
||||||
Pair("Magic", "magic"),
|
Pair("Magic", "magic"),
|
||||||
|
Pair("Magical Sex Shift", "magical-sex-shift"),
|
||||||
|
Pair("Mahou Shoujo", "mahou-shoujo"),
|
||||||
Pair("Martial Arts", "martial-arts"),
|
Pair("Martial Arts", "martial-arts"),
|
||||||
Pair("Mature", "mature"),
|
|
||||||
Pair("Mecha", "mecha"),
|
Pair("Mecha", "mecha"),
|
||||||
|
Pair("Medical", "medical"),
|
||||||
Pair("Military", "military"),
|
Pair("Military", "military"),
|
||||||
Pair("Music", "music"),
|
Pair("Music", "music"),
|
||||||
Pair("Mystery", "mystery"),
|
Pair("Mystery", "mystery"),
|
||||||
|
Pair("Mythology", "mythology"),
|
||||||
|
Pair("Organized Crime", "organized-crime"),
|
||||||
Pair("Parody", "parody"),
|
Pair("Parody", "parody"),
|
||||||
|
Pair("Performing Arts", "performing-arts"),
|
||||||
|
Pair("Pets", "pets"),
|
||||||
Pair("Police", "police"),
|
Pair("Police", "police"),
|
||||||
Pair("Psychological", "psychological"),
|
Pair("Psychological", "psychological"),
|
||||||
|
Pair("Reincarnation", "reincarnation"),
|
||||||
Pair("Romance", "romance"),
|
Pair("Romance", "romance"),
|
||||||
|
Pair("Romantic Subtext", "romantic-subtext"),
|
||||||
Pair("Samurai", "samurai"),
|
Pair("Samurai", "samurai"),
|
||||||
Pair("School", "school"),
|
Pair("School", "school"),
|
||||||
Pair("Sci-Fi", "sci-fi"),
|
Pair("Sci-Fi", "sci-fi"),
|
||||||
@ -295,15 +328,76 @@ class GogoAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|||||||
Pair("Slice of Life", "slice-of-life"),
|
Pair("Slice of Life", "slice-of-life"),
|
||||||
Pair("Space", "space"),
|
Pair("Space", "space"),
|
||||||
Pair("Sports", "sports"),
|
Pair("Sports", "sports"),
|
||||||
|
Pair("Strategy Game", "strategy-game"),
|
||||||
Pair("Super Power", "super-power"),
|
Pair("Super Power", "super-power"),
|
||||||
Pair("Supernatural", "supernatural"),
|
Pair("Supernatural", "supernatural"),
|
||||||
|
Pair("Suspense", "suspense"),
|
||||||
|
Pair("Team Sports", "team-sports"),
|
||||||
Pair("Thriller", "thriller"),
|
Pair("Thriller", "thriller"),
|
||||||
|
Pair("Time Travel", "time-travel"),
|
||||||
Pair("Vampire", "vampire"),
|
Pair("Vampire", "vampire"),
|
||||||
|
Pair("Work Life", "work-life"),
|
||||||
|
Pair("Workplace", "workplace"),
|
||||||
Pair("Yaoi", "yaoi"),
|
Pair("Yaoi", "yaoi"),
|
||||||
Pair("Yuri", "yuri")
|
Pair("Yuri", "yuri")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private class RecentFilter : UriPartFilter(
|
||||||
|
"Recent Episodes",
|
||||||
|
arrayOf(
|
||||||
|
Pair("<select>", ""),
|
||||||
|
Pair("Recent Release", "1"),
|
||||||
|
Pair("Recent Dub", "2"),
|
||||||
|
Pair("Recent Chinese", "3")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
private class SeasonFilter : UriPartFilter(
|
||||||
|
"Season",
|
||||||
|
arrayOf(
|
||||||
|
Pair("<select>", ""),
|
||||||
|
Pair("Latest season", "new-season.html"),
|
||||||
|
Pair("Winter 2023", "sub-category/winter-2023-anime"),
|
||||||
|
Pair("Fall 2022", "sub-category/fall-2022-anime"),
|
||||||
|
Pair("Summer 2022", "sub-category/summer-2022-anime"),
|
||||||
|
Pair("Spring 2022", "sub-category/spring-2022-anime"),
|
||||||
|
Pair("Winter 2022", "sub-category/winter-2022-anime"),
|
||||||
|
Pair("Fall 2021", "sub-category/fall-2021-anime"),
|
||||||
|
Pair("Summer 2021", "sub-category/summer-2021-anime"),
|
||||||
|
Pair("Spring 2021", "sub-category/spring-2021-anime"),
|
||||||
|
Pair("Winter 2021", "sub-category/winter-2021-anime"),
|
||||||
|
Pair("Fall 2020", "sub-category/fall-2020-anime"),
|
||||||
|
Pair("Summer 2020", "sub-category/summer-2020-anime"),
|
||||||
|
Pair("Spring 2020", "sub-category/spring-2020-anime"),
|
||||||
|
Pair("Winter 2020", "sub-category/winter-2020-anime"),
|
||||||
|
Pair("Fall 2019", "sub-category/fall-2019-anime"),
|
||||||
|
Pair("Summer 2019", "sub-category/summer-2019-anime"),
|
||||||
|
Pair("Spring 2019", "sub-category/spring-2019-anime"),
|
||||||
|
Pair("Winter 2019", "sub-category/winter-2019-anime"),
|
||||||
|
Pair("Fall 2018", "sub-category/fall-2018-anime"),
|
||||||
|
Pair("Summer 2018", "sub-category/summer-2018-anime"),
|
||||||
|
Pair("Spring 2018", "sub-category/spring-2018-anime"),
|
||||||
|
Pair("Winter 2018", "sub-category/winter-2018-anime"),
|
||||||
|
Pair("Fall 2017", "sub-category/fall-2017-anime"),
|
||||||
|
Pair("Summer 2017", "sub-category/summer-2017-anime"),
|
||||||
|
Pair("Spring 2017", "sub-category/spring-2017-anime"),
|
||||||
|
Pair("Winter 2017", "sub-category/winter-2017-anime"),
|
||||||
|
Pair("Fall 2016", "sub-category/fall-2016-anime"),
|
||||||
|
Pair("Summer 2016", "sub-category/summer-2016-anime"),
|
||||||
|
Pair("Spring 2016", "sub-category/spring-2016-anime"),
|
||||||
|
Pair("Winter 2016", "sub-category/winter-2016-anime"),
|
||||||
|
Pair("Fall 2015", "sub-category/fall-2015-anime"),
|
||||||
|
Pair("Summer 2015", "sub-category/summer-2015-anime"),
|
||||||
|
Pair("Spring 2015", "sub-category/spring-2015-anime"),
|
||||||
|
Pair("Winter 2015", "sub-category/winter-2015-anime"),
|
||||||
|
Pair("Fall 2014", "sub-category/fall-2014-anime"),
|
||||||
|
Pair("Summer 2014", "sub-category/summer-2014-anime"),
|
||||||
|
Pair("Spring 2014", "sub-category/spring-2014-anime"),
|
||||||
|
Pair("Winter 2014", "sub-category/winter-2014-anime")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
||||||
AnimeFilter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
AnimeFilter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
||||||
fun toUriPart() = vals[state].second
|
fun toUriPart() = vals[state].second
|
||||||
|
Reference in New Issue
Block a user