src(en/gogoanime) dead
This commit is contained in:
parent
ddf27a3d82
commit
e7aa614478
8 changed files with 0 additions and 728 deletions
|
@ -1,14 +0,0 @@
|
||||||
ext {
|
|
||||||
extName = "Gogoanime (Inactive)"
|
|
||||||
extClass = '.GogoAnime'
|
|
||||||
extVersionCode = 88
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: "$rootDir/common.gradle"
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation(project(':lib:streamwish-extractor'))
|
|
||||||
implementation(project(':lib:mp4upload-extractor'))
|
|
||||||
implementation(project(':lib:dood-extractor'))
|
|
||||||
implementation(project(':lib:gogostream-extractor'))
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
Before Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8 KiB |
|
@ -1,300 +0,0 @@
|
||||||
package eu.kanade.tachiyomi.animeextension.en.gogoanime
|
|
||||||
|
|
||||||
import android.app.Application
|
|
||||||
import androidx.preference.ListPreference
|
|
||||||
import androidx.preference.MultiSelectListPreference
|
|
||||||
import androidx.preference.PreferenceScreen
|
|
||||||
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
|
|
||||||
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
|
|
||||||
import eu.kanade.tachiyomi.animesource.model.SAnime
|
|
||||||
import eu.kanade.tachiyomi.animesource.model.SEpisode
|
|
||||||
import eu.kanade.tachiyomi.animesource.model.Video
|
|
||||||
import eu.kanade.tachiyomi.animesource.online.ParsedAnimeHttpSource
|
|
||||||
import eu.kanade.tachiyomi.lib.doodextractor.DoodExtractor
|
|
||||||
import eu.kanade.tachiyomi.lib.gogostreamextractor.GogoStreamExtractor
|
|
||||||
import eu.kanade.tachiyomi.lib.mp4uploadextractor.Mp4uploadExtractor
|
|
||||||
import eu.kanade.tachiyomi.lib.streamwishextractor.StreamWishExtractor
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
|
||||||
import eu.kanade.tachiyomi.util.parallelCatchingFlatMapBlocking
|
|
||||||
import okhttp3.Request
|
|
||||||
import okhttp3.Response
|
|
||||||
import org.jsoup.nodes.Document
|
|
||||||
import org.jsoup.nodes.Element
|
|
||||||
import uy.kohesive.injekt.Injekt
|
|
||||||
import uy.kohesive.injekt.api.get
|
|
||||||
|
|
||||||
class GogoAnime : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
|
||||||
|
|
||||||
override val name = "Gogoanime (Inactive)"
|
|
||||||
override val id = 7055547649318749672L
|
|
||||||
|
|
||||||
// TODO: Check frequency of url changes to potentially
|
|
||||||
// add back overridable baseurl preference
|
|
||||||
override val baseUrl = "https://anitaku.to"
|
|
||||||
|
|
||||||
override val lang = "en"
|
|
||||||
|
|
||||||
override val supportsLatest = true
|
|
||||||
|
|
||||||
override fun headersBuilder() = super.headersBuilder()
|
|
||||||
.add("Origin", baseUrl)
|
|
||||||
.add("Referer", "$baseUrl/")
|
|
||||||
|
|
||||||
private val preferences by lazy {
|
|
||||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
|
||||||
}
|
|
||||||
|
|
||||||
// ============================== Popular ===============================
|
|
||||||
override fun popularAnimeRequest(page: Int): Request = throw Exception("Source is no longer active.\nUninstall this extension.")
|
|
||||||
|
|
||||||
override fun popularAnimeSelector(): String = "div.img a"
|
|
||||||
|
|
||||||
override fun popularAnimeFromElement(element: Element): SAnime = SAnime.create().apply {
|
|
||||||
setUrlWithoutDomain(element.attr("href"))
|
|
||||||
thumbnail_url = element.selectFirst("img")!!.attr("src")
|
|
||||||
title = element.attr("title")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun popularAnimeNextPageSelector(): String = "ul.pagination-list li:last-child:not(.selected)"
|
|
||||||
|
|
||||||
// =============================== Latest ===============================
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request = throw Exception("Source is no longer active.\nUninstall this extension.")
|
|
||||||
|
|
||||||
override fun latestUpdatesSelector(): String = "div.img a"
|
|
||||||
|
|
||||||
override fun latestUpdatesFromElement(element: Element) = SAnime.create().apply {
|
|
||||||
thumbnail_url = element.selectFirst("img")?.attr("src")
|
|
||||||
title = element.attr("title")
|
|
||||||
val slug = element.attr("href").substringAfter(baseUrl)
|
|
||||||
.trimStart('/')
|
|
||||||
.substringBefore("-episode-")
|
|
||||||
setUrlWithoutDomain("/category/$slug")
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun latestUpdatesNextPageSelector(): String = popularAnimeNextPageSelector()
|
|
||||||
|
|
||||||
// =============================== Search ===============================
|
|
||||||
override fun searchAnimeRequest(page: Int, query: String, filters: AnimeFilterList): Request {
|
|
||||||
val params = GogoAnimeFilters.getSearchParameters(filters)
|
|
||||||
|
|
||||||
return when {
|
|
||||||
params.genre.isNotEmpty() -> GET("$baseUrl/genre/${params.genre}?page=$page", headers)
|
|
||||||
params.recent.isNotEmpty() -> GET("$AJAX_URL/page-recent-release.html?page=$page&type=${params.recent}", headers)
|
|
||||||
params.season.isNotEmpty() -> GET("$baseUrl/${params.season}?page=$page", headers)
|
|
||||||
else -> GET("$baseUrl/filter.html?keyword=$query&${params.filter}&page=$page", headers)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun searchAnimeSelector(): String = popularAnimeSelector()
|
|
||||||
|
|
||||||
override fun searchAnimeFromElement(element: Element): SAnime = popularAnimeFromElement(element)
|
|
||||||
|
|
||||||
override fun searchAnimeNextPageSelector(): String = popularAnimeNextPageSelector()
|
|
||||||
|
|
||||||
// ============================== Filters ===============================
|
|
||||||
override fun getFilterList(): AnimeFilterList = GogoAnimeFilters.FILTER_LIST
|
|
||||||
|
|
||||||
// =========================== Anime Details ============================
|
|
||||||
override fun animeDetailsParse(document: Document): SAnime {
|
|
||||||
val infoDocument = document.selectFirst("div.anime-info a[href]")?.let {
|
|
||||||
client.newCall(GET(it.absUrl("href"), headers)).execute().asJsoup()
|
|
||||||
} ?: document
|
|
||||||
|
|
||||||
return SAnime.create().apply {
|
|
||||||
title = infoDocument.selectFirst("div.anime_info_body_bg > h1")!!.text()
|
|
||||||
genre = infoDocument.getInfo("Genre:")
|
|
||||||
status = parseStatus(infoDocument.getInfo("Status:").orEmpty())
|
|
||||||
|
|
||||||
description = buildString {
|
|
||||||
val summary = infoDocument.selectFirst("div.anime_info_body_bg > div.description")
|
|
||||||
append(summary?.text())
|
|
||||||
|
|
||||||
// add alternative name to anime description
|
|
||||||
infoDocument.getInfo("Other name:")?.also {
|
|
||||||
if (isNotBlank()) append("\n\n")
|
|
||||||
append("Other name(s): $it")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ============================== Episodes ==============================
|
|
||||||
private fun episodesRequest(totalEpisodes: String, id: String): List<SEpisode> {
|
|
||||||
val request = GET("$AJAX_URL/load-list-episode?ep_start=0&ep_end=$totalEpisodes&id=$id", headers)
|
|
||||||
val epResponse = client.newCall(request).execute()
|
|
||||||
val document = epResponse.asJsoup()
|
|
||||||
return document.select("a").map(::episodeFromElement)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun episodeListParse(response: Response): List<SEpisode> {
|
|
||||||
val document = response.asJsoup()
|
|
||||||
val totalEpisodes = document.select(episodeListSelector()).last()!!.attr("ep_end")
|
|
||||||
val id = document.select("input#movie_id").attr("value")
|
|
||||||
return episodesRequest(totalEpisodes, id)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun episodeListSelector() = "ul#episode_page li a"
|
|
||||||
|
|
||||||
override fun episodeFromElement(element: Element): SEpisode {
|
|
||||||
val ep = element.selectFirst("div.name")!!.ownText().substringAfter(" ")
|
|
||||||
return SEpisode.create().apply {
|
|
||||||
setUrlWithoutDomain(element.attr("abs:href"))
|
|
||||||
episode_number = ep.toFloat()
|
|
||||||
name = "Episode $ep"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ============================ Video Links =============================
|
|
||||||
private val gogoExtractor by lazy { GogoStreamExtractor(client) }
|
|
||||||
private val streamwishExtractor by lazy { StreamWishExtractor(client, headers) }
|
|
||||||
private val doodExtractor by lazy { DoodExtractor(client) }
|
|
||||||
private val mp4uploadExtractor by lazy { Mp4uploadExtractor(client) }
|
|
||||||
|
|
||||||
override fun videoListParse(response: Response): List<Video> {
|
|
||||||
val document = response.asJsoup()
|
|
||||||
val hosterSelection = preferences.getStringSet(PREF_HOSTER_KEY, PREF_HOSTER_DEFAULT)!!
|
|
||||||
|
|
||||||
return document.select("div.anime_muti_link > ul > li").parallelCatchingFlatMapBlocking { server ->
|
|
||||||
val className = server.className()
|
|
||||||
if (!hosterSelection.contains(className)) return@parallelCatchingFlatMapBlocking emptyList()
|
|
||||||
val serverUrl = server.selectFirst("a")
|
|
||||||
?.attr("abs:data-video")
|
|
||||||
?: return@parallelCatchingFlatMapBlocking emptyList()
|
|
||||||
|
|
||||||
getHosterVideos(className, serverUrl)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getHosterVideos(className: String, serverUrl: String): List<Video> {
|
|
||||||
return when (className) {
|
|
||||||
"anime", "vidcdn" -> gogoExtractor.videosFromUrl(serverUrl)
|
|
||||||
"streamwish" -> streamwishExtractor.videosFromUrl(serverUrl)
|
|
||||||
"doodstream" -> doodExtractor.videosFromUrl(serverUrl)
|
|
||||||
"mp4upload" -> mp4uploadExtractor.videosFromUrl(serverUrl, headers)
|
|
||||||
"filelions" -> {
|
|
||||||
streamwishExtractor.videosFromUrl(serverUrl, videoNameGen = { quality -> "FileLions - $quality" })
|
|
||||||
}
|
|
||||||
else -> emptyList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun videoListSelector() = throw UnsupportedOperationException()
|
|
||||||
|
|
||||||
override fun videoFromElement(element: Element) = throw UnsupportedOperationException()
|
|
||||||
|
|
||||||
override fun videoUrlParse(document: Document) = throw UnsupportedOperationException()
|
|
||||||
|
|
||||||
// ============================= Utilities ==============================
|
|
||||||
private fun Document.getInfo(text: String): String? {
|
|
||||||
val base = selectFirst("p.type:has(span:containsOwn($text))") ?: return null
|
|
||||||
return base.select("a").eachText().joinToString("")
|
|
||||||
.ifBlank { base.ownText() }
|
|
||||||
.takeUnless(String::isBlank)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun List<Video>.sort(): List<Video> {
|
|
||||||
val quality = preferences.getString(PREF_QUALITY_KEY, PREF_QUALITY_DEFAULT)!!
|
|
||||||
val server = preferences.getString(PREF_SERVER_KEY, PREF_SERVER_DEFAULT)!!
|
|
||||||
|
|
||||||
return sortedWith(
|
|
||||||
compareBy(
|
|
||||||
{ it.quality.contains(quality) },
|
|
||||||
{ Regex("""(\d+)p""").find(it.quality)?.groupValues?.get(1)?.toIntOrNull() ?: 0 },
|
|
||||||
{ it.quality.contains(server) },
|
|
||||||
),
|
|
||||||
).reversed()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun parseStatus(statusString: String): Int {
|
|
||||||
return when (statusString) {
|
|
||||||
"Ongoing" -> SAnime.ONGOING
|
|
||||||
"Completed" -> SAnime.COMPLETED
|
|
||||||
else -> SAnime.UNKNOWN
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
companion object {
|
|
||||||
private const val AJAX_URL = "https://ajax.gogocdn.net/ajax"
|
|
||||||
|
|
||||||
private val HOSTERS = arrayOf(
|
|
||||||
"Gogostream",
|
|
||||||
"Vidstreaming",
|
|
||||||
"Doodstream",
|
|
||||||
"StreamWish",
|
|
||||||
"Mp4upload",
|
|
||||||
"FileLions",
|
|
||||||
)
|
|
||||||
private val HOSTERS_NAMES = arrayOf(
|
|
||||||
// Names that appears in the gogo html
|
|
||||||
"vidcdn",
|
|
||||||
"anime",
|
|
||||||
"doodstream",
|
|
||||||
"streamwish",
|
|
||||||
"mp4upload",
|
|
||||||
"filelions",
|
|
||||||
)
|
|
||||||
|
|
||||||
private const val PREF_QUALITY_KEY = "preferred_quality"
|
|
||||||
private const val PREF_QUALITY_TITLE = "Preferred quality"
|
|
||||||
private const val PREF_QUALITY_DEFAULT = "1080"
|
|
||||||
private val PREF_QUALITY_ENTRIES = arrayOf("1080p", "720p", "480p", "360p")
|
|
||||||
private val PREF_QUALITY_VALUES = arrayOf("1080", "720", "480", "360")
|
|
||||||
|
|
||||||
private const val PREF_SERVER_KEY = "preferred_server"
|
|
||||||
private const val PREF_SERVER_TITLE = "Preferred server"
|
|
||||||
private const val PREF_SERVER_DEFAULT = "Gogostream"
|
|
||||||
|
|
||||||
private const val PREF_HOSTER_KEY = "hoster_selection"
|
|
||||||
private const val PREF_HOSTER_TITLE = "Enable/Disable Hosts"
|
|
||||||
private val PREF_HOSTER_DEFAULT = HOSTERS_NAMES.toSet()
|
|
||||||
}
|
|
||||||
|
|
||||||
// ============================== Settings ==============================
|
|
||||||
override fun setupPreferenceScreen(screen: PreferenceScreen) {
|
|
||||||
ListPreference(screen.context).apply {
|
|
||||||
key = PREF_QUALITY_KEY
|
|
||||||
title = PREF_QUALITY_TITLE
|
|
||||||
entries = PREF_QUALITY_ENTRIES
|
|
||||||
entryValues = PREF_QUALITY_VALUES
|
|
||||||
setDefaultValue(PREF_QUALITY_DEFAULT)
|
|
||||||
summary = "%s"
|
|
||||||
|
|
||||||
setOnPreferenceChangeListener { _, newValue ->
|
|
||||||
val selected = newValue as String
|
|
||||||
val index = findIndexOfValue(selected)
|
|
||||||
val entry = entryValues[index] as String
|
|
||||||
preferences.edit().putString(key, entry).commit()
|
|
||||||
}
|
|
||||||
}.also(screen::addPreference)
|
|
||||||
|
|
||||||
ListPreference(screen.context).apply {
|
|
||||||
key = PREF_SERVER_KEY
|
|
||||||
title = PREF_SERVER_TITLE
|
|
||||||
entries = HOSTERS
|
|
||||||
entryValues = HOSTERS
|
|
||||||
setDefaultValue(PREF_SERVER_DEFAULT)
|
|
||||||
summary = "%s"
|
|
||||||
|
|
||||||
setOnPreferenceChangeListener { _, newValue ->
|
|
||||||
val selected = newValue as String
|
|
||||||
val index = findIndexOfValue(selected)
|
|
||||||
val entry = entryValues[index] as String
|
|
||||||
preferences.edit().putString(key, entry).commit()
|
|
||||||
}
|
|
||||||
}.also(screen::addPreference)
|
|
||||||
|
|
||||||
MultiSelectListPreference(screen.context).apply {
|
|
||||||
key = PREF_HOSTER_KEY
|
|
||||||
title = PREF_HOSTER_TITLE
|
|
||||||
entries = HOSTERS
|
|
||||||
entryValues = HOSTERS_NAMES
|
|
||||||
setDefaultValue(PREF_HOSTER_DEFAULT)
|
|
||||||
|
|
||||||
setOnPreferenceChangeListener { _, newValue ->
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
|
||||||
preferences.edit().putStringSet(key, newValue as Set<String>).commit()
|
|
||||||
}
|
|
||||||
}.also(screen::addPreference)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,414 +0,0 @@
|
||||||
package eu.kanade.tachiyomi.animeextension.en.gogoanime
|
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.animesource.model.AnimeFilter
|
|
||||||
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
|
|
||||||
|
|
||||||
object GogoAnimeFilters {
|
|
||||||
open class QueryPartFilter(
|
|
||||||
displayName: String,
|
|
||||||
val vals: Array<Pair<String, String>>,
|
|
||||||
) : AnimeFilter.Select<String>(
|
|
||||||
displayName,
|
|
||||||
vals.map { it.first }.toTypedArray(),
|
|
||||||
) {
|
|
||||||
fun toQueryPart() = vals[state].second
|
|
||||||
}
|
|
||||||
|
|
||||||
open class CheckBoxFilterList(name: String, val pairs: Array<Pair<String, String>>) :
|
|
||||||
AnimeFilter.Group<AnimeFilter.CheckBox>(name, pairs.map { CheckBoxVal(it.first, false) })
|
|
||||||
|
|
||||||
private class CheckBoxVal(name: String, state: Boolean = false) : AnimeFilter.CheckBox(name, state)
|
|
||||||
|
|
||||||
private inline fun <reified R> AnimeFilterList.asQueryPart(): String {
|
|
||||||
return (getFirst<R>() as QueryPartFilter).toQueryPart()
|
|
||||||
}
|
|
||||||
|
|
||||||
private inline fun <reified R> AnimeFilterList.getFirst(): R {
|
|
||||||
return first { it is R } as R
|
|
||||||
}
|
|
||||||
|
|
||||||
private inline fun <reified R> AnimeFilterList.parseCheckbox(
|
|
||||||
options: Array<Pair<String, String>>,
|
|
||||||
name: String,
|
|
||||||
): String {
|
|
||||||
return (getFirst<R>() as CheckBoxFilterList).state
|
|
||||||
.filter { it.state }
|
|
||||||
.map { checkbox -> options.find { it.first == checkbox.name }!!.second }
|
|
||||||
.filter(String::isNotBlank)
|
|
||||||
.joinToString("&") { "$name[]=$it" }
|
|
||||||
}
|
|
||||||
|
|
||||||
class GenreSearchFilter : CheckBoxFilterList("Genre", GogoAnimeFiltersData.GENRE_SEARCH_LIST)
|
|
||||||
class CountrySearchFilter : CheckBoxFilterList("Country", GogoAnimeFiltersData.COUNTRY_SEARCH_LIST)
|
|
||||||
class SeasonSearchFilter : CheckBoxFilterList("Season", GogoAnimeFiltersData.SEASON_SEARCH_LIST)
|
|
||||||
class YearSearchFilter : CheckBoxFilterList("Year", GogoAnimeFiltersData.YEAR_SEARCH_LIST)
|
|
||||||
class LanguageSearchFilter : CheckBoxFilterList("Language", GogoAnimeFiltersData.LANGUAGE_SEARCH_LIST)
|
|
||||||
class TypeSearchFilter : CheckBoxFilterList("Type", GogoAnimeFiltersData.TYPE_SEARCH_LIST)
|
|
||||||
class StatusSearchFilter : CheckBoxFilterList("Status", GogoAnimeFiltersData.STATUS_SEARCH_LIST)
|
|
||||||
class SortSearchFilter : QueryPartFilter("Sort by", GogoAnimeFiltersData.SORT_SEARCH_LIST)
|
|
||||||
|
|
||||||
class GenreFilter : QueryPartFilter("Genre", GogoAnimeFiltersData.GENRE_LIST)
|
|
||||||
class RecentFilter : QueryPartFilter("Recent episodes", GogoAnimeFiltersData.RECENT_LIST)
|
|
||||||
class SeasonFilter : QueryPartFilter("Season", GogoAnimeFiltersData.SEASON_LIST)
|
|
||||||
|
|
||||||
val FILTER_LIST get() = AnimeFilterList(
|
|
||||||
AnimeFilter.Header("Advanced search"),
|
|
||||||
GenreSearchFilter(),
|
|
||||||
CountrySearchFilter(),
|
|
||||||
SeasonSearchFilter(),
|
|
||||||
YearSearchFilter(),
|
|
||||||
LanguageSearchFilter(),
|
|
||||||
TypeSearchFilter(),
|
|
||||||
StatusSearchFilter(),
|
|
||||||
SortSearchFilter(),
|
|
||||||
AnimeFilter.Separator(),
|
|
||||||
AnimeFilter.Header("Select sub-page"),
|
|
||||||
AnimeFilter.Header("Note: Ignores search & other filters"),
|
|
||||||
GenreFilter(),
|
|
||||||
RecentFilter(),
|
|
||||||
SeasonFilter(),
|
|
||||||
)
|
|
||||||
|
|
||||||
data class FilterSearchParams(
|
|
||||||
val filter: String = "",
|
|
||||||
val genre: String = "",
|
|
||||||
val recent: String = "",
|
|
||||||
val season: String = "",
|
|
||||||
)
|
|
||||||
|
|
||||||
internal fun getSearchParameters(filters: AnimeFilterList): FilterSearchParams {
|
|
||||||
if (filters.isEmpty()) return FilterSearchParams()
|
|
||||||
|
|
||||||
val filter = buildList {
|
|
||||||
add(filters.parseCheckbox<GenreSearchFilter>(GogoAnimeFiltersData.GENRE_SEARCH_LIST, "genre"))
|
|
||||||
add(filters.parseCheckbox<CountrySearchFilter>(GogoAnimeFiltersData.GENRE_SEARCH_LIST, "country"))
|
|
||||||
add(filters.parseCheckbox<SeasonSearchFilter>(GogoAnimeFiltersData.SEASON_SEARCH_LIST, "season"))
|
|
||||||
add(filters.parseCheckbox<YearSearchFilter>(GogoAnimeFiltersData.YEAR_SEARCH_LIST, "year"))
|
|
||||||
add(filters.parseCheckbox<LanguageSearchFilter>(GogoAnimeFiltersData.LANGUAGE_SEARCH_LIST, "language"))
|
|
||||||
add(filters.parseCheckbox<TypeSearchFilter>(GogoAnimeFiltersData.TYPE_SEARCH_LIST, "type"))
|
|
||||||
add(filters.parseCheckbox<StatusSearchFilter>(GogoAnimeFiltersData.STATUS_SEARCH_LIST, "status"))
|
|
||||||
add("sort=${filters.asQueryPart<SortSearchFilter>()}")
|
|
||||||
}.filter(String::isNotBlank).joinToString("&")
|
|
||||||
|
|
||||||
return FilterSearchParams(
|
|
||||||
filter,
|
|
||||||
filters.asQueryPart<GenreFilter>(),
|
|
||||||
filters.asQueryPart<RecentFilter>(),
|
|
||||||
filters.asQueryPart<SeasonFilter>(),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
private object GogoAnimeFiltersData {
|
|
||||||
// copy($("div.cls_genre ul.dropdown-menu li").map((i,el) => `Pair("${$(el).text().trim()}", "${$(el).find("input").first().attr('value')}")`).get().join(',\n'))
|
|
||||||
// on /filter.html
|
|
||||||
val GENRE_SEARCH_LIST = arrayOf(
|
|
||||||
Pair("Action", "action"),
|
|
||||||
Pair("Adult Cast", "adult-cast"),
|
|
||||||
Pair("Adventure", "adventure"),
|
|
||||||
Pair("Anthropomorphic", "anthropomorphic"),
|
|
||||||
Pair("Avant Garde", "avant-garde"),
|
|
||||||
Pair("Boys Love", "shounen-ai"),
|
|
||||||
Pair("Cars", "cars"),
|
|
||||||
Pair("CGDCT", "cgdct"),
|
|
||||||
Pair("Childcare", "childcare"),
|
|
||||||
Pair("Comedy", "comedy"),
|
|
||||||
Pair("Comic", "comic"),
|
|
||||||
Pair("Crime", "crime"),
|
|
||||||
Pair("Crossdressing", "crossdressing"),
|
|
||||||
Pair("Delinquents", "delinquents"),
|
|
||||||
Pair("Dementia", "dementia"),
|
|
||||||
Pair("Demons", "demons"),
|
|
||||||
Pair("Detective", "detective"),
|
|
||||||
Pair("Drama", "drama"),
|
|
||||||
Pair("Dub", "dub"),
|
|
||||||
Pair("Ecchi", "ecchi"),
|
|
||||||
Pair("Erotica", "erotica"),
|
|
||||||
Pair("Family", "family"),
|
|
||||||
Pair("Fantasy", "fantasy"),
|
|
||||||
Pair("Gag Humor", "gag-humor"),
|
|
||||||
Pair("Game", "game"),
|
|
||||||
Pair("Gender Bender", "gender-bender"),
|
|
||||||
Pair("Gore", "gore"),
|
|
||||||
Pair("Gourmet", "gourmet"),
|
|
||||||
Pair("Harem", "harem"),
|
|
||||||
Pair("Hentai", "hentai"),
|
|
||||||
Pair("High Stakes Game", "high-stakes-game"),
|
|
||||||
Pair("Historical", "historical"),
|
|
||||||
Pair("Horror", "horror"),
|
|
||||||
Pair("Isekai", "isekai"),
|
|
||||||
Pair("Iyashikei", "iyashikei"),
|
|
||||||
Pair("Josei", "josei"),
|
|
||||||
Pair("Kids", "kids"),
|
|
||||||
Pair("Magic", "magic"),
|
|
||||||
Pair("Magical Sex Shift", "magical-sex-shift"),
|
|
||||||
Pair("Mahou Shoujo", "mahou-shoujo"),
|
|
||||||
Pair("Martial Arts", "martial-arts"),
|
|
||||||
Pair("Mecha", "mecha"),
|
|
||||||
Pair("Medical", "medical"),
|
|
||||||
Pair("Military", "military"),
|
|
||||||
Pair("Music", "music"),
|
|
||||||
Pair("Mystery", "mystery"),
|
|
||||||
Pair("Mythology", "mythology"),
|
|
||||||
Pair("Organized Crime", "organized-crime"),
|
|
||||||
Pair("Parody", "parody"),
|
|
||||||
Pair("Performing Arts", "performing-arts"),
|
|
||||||
Pair("Pets", "pets"),
|
|
||||||
Pair("Police", "police"),
|
|
||||||
Pair("Psychological", "psychological"),
|
|
||||||
Pair("Racing", "racing"),
|
|
||||||
Pair("Reincarnation", "reincarnation"),
|
|
||||||
Pair("Romance", "romance"),
|
|
||||||
Pair("Romantic Subtext", "romantic-subtext"),
|
|
||||||
Pair("Samurai", "samurai"),
|
|
||||||
Pair("School", "school"),
|
|
||||||
Pair("Sci-Fi", "sci-fi"),
|
|
||||||
Pair("Seinen", "seinen"),
|
|
||||||
Pair("Shoujo", "shoujo"),
|
|
||||||
Pair("Shoujo Ai", "shoujo-ai"),
|
|
||||||
Pair("Shounen", "shounen"),
|
|
||||||
Pair("Showbiz", "showbiz"),
|
|
||||||
Pair("Slice of Life", "slice-of-life"),
|
|
||||||
Pair("Space", "space"),
|
|
||||||
Pair("Sports", "sports"),
|
|
||||||
Pair("Strategy Game", "strategy-game"),
|
|
||||||
Pair("Super Power", "super-power"),
|
|
||||||
Pair("Supernatural", "supernatural"),
|
|
||||||
Pair("Survival", "survival"),
|
|
||||||
Pair("Suspense", "suspense"),
|
|
||||||
Pair("Team Sports", "team-sports"),
|
|
||||||
Pair("Thriller", "thriller"),
|
|
||||||
Pair("Time Travel", "time-travel"),
|
|
||||||
Pair("Vampire", "vampire"),
|
|
||||||
Pair("Visual Arts", "visual-arts"),
|
|
||||||
Pair("Work Life", "work-life"),
|
|
||||||
Pair("Workplace", "workplace"),
|
|
||||||
Pair("Yaoi", "yaoi"),
|
|
||||||
Pair("Yuri", "yuri"),
|
|
||||||
)
|
|
||||||
|
|
||||||
// copy($("div.cls_genre ul.dropdown-menu li").map((i,el) => `Pair("${$(el).text().trim()}", "${$(el).find("input").first().attr('value')}")`).get().join(',\n'))
|
|
||||||
// on /filter.html
|
|
||||||
val COUNTRY_SEARCH_LIST = arrayOf(
|
|
||||||
Pair("China", "5"),
|
|
||||||
Pair("Japan", "2"),
|
|
||||||
)
|
|
||||||
|
|
||||||
// copy($("div.cls_season ul.dropdown-menu li").map((i,el) => `Pair("${$(el).text().trim()}", "${$(el).find("input").first().attr('value')}")`).get().join(',\n'))
|
|
||||||
// on /filter.html
|
|
||||||
val SEASON_SEARCH_LIST = arrayOf(
|
|
||||||
Pair("Fall", "fall"),
|
|
||||||
Pair("Summer", "summer"),
|
|
||||||
Pair("Spring", "spring"),
|
|
||||||
Pair("Winter", "winter"),
|
|
||||||
)
|
|
||||||
|
|
||||||
// copy($("div.cls_year ul.dropdown-menu li").map((i,el) => `Pair("${$(el).text().trim()}", "${$(el).find("input").first().attr('value')}")`).get().join(',\n'))
|
|
||||||
// on /filter.html
|
|
||||||
val YEAR_SEARCH_LIST = arrayOf(
|
|
||||||
Pair("2024", "2024"),
|
|
||||||
Pair("2023", "2023"),
|
|
||||||
Pair("2022", "2022"),
|
|
||||||
Pair("2021", "2021"),
|
|
||||||
Pair("2020", "2020"),
|
|
||||||
Pair("2019", "2019"),
|
|
||||||
Pair("2018", "2018"),
|
|
||||||
Pair("2017", "2017"),
|
|
||||||
Pair("2016", "2016"),
|
|
||||||
Pair("2015", "2015"),
|
|
||||||
Pair("2014", "2014"),
|
|
||||||
Pair("2013", "2013"),
|
|
||||||
Pair("2012", "2012"),
|
|
||||||
Pair("2011", "2011"),
|
|
||||||
Pair("2010", "2010"),
|
|
||||||
Pair("2009", "2009"),
|
|
||||||
Pair("2008", "2008"),
|
|
||||||
Pair("2007", "2007"),
|
|
||||||
Pair("2006", "2006"),
|
|
||||||
Pair("2005", "2005"),
|
|
||||||
Pair("2004", "2004"),
|
|
||||||
Pair("2003", "2003"),
|
|
||||||
Pair("2002", "2002"),
|
|
||||||
Pair("2001", "2001"),
|
|
||||||
Pair("2000", "2000"),
|
|
||||||
Pair("1999", "1999"),
|
|
||||||
)
|
|
||||||
|
|
||||||
// copy($("div.cls_lang ul.dropdown-menu li").map((i,el) => `Pair("${$(el).text().trim()}", "${$(el).find("input").first().attr('value')}")`).get().join(',\n'))
|
|
||||||
// on /filter.html
|
|
||||||
val LANGUAGE_SEARCH_LIST = arrayOf(
|
|
||||||
Pair("Sub & Dub", "subdub"),
|
|
||||||
Pair("Sub", "sub"),
|
|
||||||
Pair("Dub", "dub"),
|
|
||||||
)
|
|
||||||
|
|
||||||
// copy($("div.cls_type ul.dropdown-menu li").map((i,el) => `Pair("${$(el).text().trim()}", "${$(el).find("input").first().attr('value')}")`).get().join(',\n'))
|
|
||||||
// on /filter.html
|
|
||||||
val TYPE_SEARCH_LIST = arrayOf(
|
|
||||||
Pair("Movie", "3"),
|
|
||||||
Pair("TV", "1"),
|
|
||||||
Pair("OVA", "26"),
|
|
||||||
Pair("ONA", "30"),
|
|
||||||
Pair("Special", "2"),
|
|
||||||
Pair("Music", "32"),
|
|
||||||
)
|
|
||||||
|
|
||||||
// copy($("div.cls_status ul.dropdown-menu li").map((i,el) => `Pair("${$(el).text().trim()}", "${$(el).find("input").first().attr('value')}")`).get().join(',\n'))
|
|
||||||
// on /filter.html
|
|
||||||
val STATUS_SEARCH_LIST = arrayOf(
|
|
||||||
Pair("Not Yet Aired", "Upcoming"),
|
|
||||||
Pair("Ongoing", "Ongoing"),
|
|
||||||
Pair("Completed", "Completed"),
|
|
||||||
)
|
|
||||||
|
|
||||||
// copy($("div.cls_sort ul.dropdown-menu li").map((i,el) => `Pair("${$(el).text().trim()}", "${$(el).find("input").first().attr('value')}")`).get().join(',\n'))
|
|
||||||
// on /filter.html
|
|
||||||
val SORT_SEARCH_LIST = arrayOf(
|
|
||||||
Pair("Name A-Z", "title_az"),
|
|
||||||
Pair("Recently updated", "recently_updated"),
|
|
||||||
Pair("Recently added", "recently_added"),
|
|
||||||
Pair("Release date", "release_date"),
|
|
||||||
)
|
|
||||||
|
|
||||||
// copy($("div.dropdown-menu > a.dropdown-item").map((i,el) => `Pair("${$(el).text().trim()}", "${$(el).attr('href').trim().slice(18)}")`).get().join(',\n'))
|
|
||||||
// on /
|
|
||||||
val GENRE_LIST = arrayOf(
|
|
||||||
Pair("<select>", ""),
|
|
||||||
Pair("Action", "action"),
|
|
||||||
Pair("Adult Cast", "adult-cast"),
|
|
||||||
Pair("Adventure", "adventure"),
|
|
||||||
Pair("Anthropomorphic", "anthropomorphic"),
|
|
||||||
Pair("Avant Garde", "avant-garde"),
|
|
||||||
Pair("Boys Love", "shounen-ai"),
|
|
||||||
Pair("Cars", "cars"),
|
|
||||||
Pair("CGDCT", "cgdct"),
|
|
||||||
Pair("Childcare", "childcare"),
|
|
||||||
Pair("Comedy", "comedy"),
|
|
||||||
Pair("Comic", "comic"),
|
|
||||||
Pair("Crime", "crime"),
|
|
||||||
Pair("Crossdressing", "crossdressing"),
|
|
||||||
Pair("Delinquents", "delinquents"),
|
|
||||||
Pair("Dementia", "dementia"),
|
|
||||||
Pair("Demons", "demons"),
|
|
||||||
Pair("Detective", "detective"),
|
|
||||||
Pair("Drama", "drama"),
|
|
||||||
Pair("Dub", "dub"),
|
|
||||||
Pair("Ecchi", "ecchi"),
|
|
||||||
Pair("Erotica", "erotica"),
|
|
||||||
Pair("Family", "family"),
|
|
||||||
Pair("Fantasy", "fantasy"),
|
|
||||||
Pair("Gag Humor", "gag-humor"),
|
|
||||||
Pair("Game", "game"),
|
|
||||||
Pair("Gender Bender", "gender-bender"),
|
|
||||||
Pair("Gore", "gore"),
|
|
||||||
Pair("Gourmet", "gourmet"),
|
|
||||||
Pair("Harem", "harem"),
|
|
||||||
Pair("Hentai", "hentai"),
|
|
||||||
Pair("High Stakes Game", "high-stakes-game"),
|
|
||||||
Pair("Historical", "historical"),
|
|
||||||
Pair("Horror", "horror"),
|
|
||||||
Pair("Isekai", "isekai"),
|
|
||||||
Pair("Iyashikei", "iyashikei"),
|
|
||||||
Pair("Josei", "josei"),
|
|
||||||
Pair("Kids", "kids"),
|
|
||||||
Pair("Magic", "magic"),
|
|
||||||
Pair("Magical Sex Shift", "magical-sex-shift"),
|
|
||||||
Pair("Mahou Shoujo", "mahou-shoujo"),
|
|
||||||
Pair("Martial Arts", "martial-arts"),
|
|
||||||
Pair("Mecha", "mecha"),
|
|
||||||
Pair("Medical", "medical"),
|
|
||||||
Pair("Military", "military"),
|
|
||||||
Pair("Music", "music"),
|
|
||||||
Pair("Mystery", "mystery"),
|
|
||||||
Pair("Mythology", "mythology"),
|
|
||||||
Pair("Organized Crime", "organized-crime"),
|
|
||||||
Pair("Parody", "parody"),
|
|
||||||
Pair("Performing Arts", "performing-arts"),
|
|
||||||
Pair("Pets", "pets"),
|
|
||||||
Pair("Police", "police"),
|
|
||||||
Pair("Psychological", "psychological"),
|
|
||||||
Pair("Racing", "racing"),
|
|
||||||
Pair("Reincarnation", "reincarnation"),
|
|
||||||
Pair("Romance", "romance"),
|
|
||||||
Pair("Romantic Subtext", "romantic-subtext"),
|
|
||||||
Pair("Samurai", "samurai"),
|
|
||||||
Pair("School", "school"),
|
|
||||||
Pair("Sci-Fi", "sci-fi"),
|
|
||||||
Pair("Seinen", "seinen"),
|
|
||||||
Pair("Shoujo", "shoujo"),
|
|
||||||
Pair("Shoujo Ai", "shoujo-ai"),
|
|
||||||
Pair("Shounen", "shounen"),
|
|
||||||
Pair("Showbiz", "showbiz"),
|
|
||||||
Pair("Slice of Life", "slice-of-life"),
|
|
||||||
Pair("Space", "space"),
|
|
||||||
Pair("Sports", "sports"),
|
|
||||||
Pair("Strategy Game", "strategy-game"),
|
|
||||||
Pair("Super Power", "super-power"),
|
|
||||||
Pair("Supernatural", "supernatural"),
|
|
||||||
Pair("Survival", "survival"),
|
|
||||||
Pair("Suspense", "suspense"),
|
|
||||||
Pair("Team Sports", "team-sports"),
|
|
||||||
Pair("Thriller", "thriller"),
|
|
||||||
Pair("Time Travel", "time-travel"),
|
|
||||||
Pair("Vampire", "vampire"),
|
|
||||||
Pair("Visual Arts", "visual-arts"),
|
|
||||||
Pair("Work Life", "work-life"),
|
|
||||||
Pair("Workplace", "workplace"),
|
|
||||||
Pair("Yaoi", "yaoi"),
|
|
||||||
Pair("Yuri", "yuri"),
|
|
||||||
)
|
|
||||||
|
|
||||||
val RECENT_LIST = arrayOf(
|
|
||||||
Pair("<select>", ""),
|
|
||||||
Pair("Recent Release", "1"),
|
|
||||||
Pair("Recent Dub", "2"),
|
|
||||||
Pair("Recent Chinese", "3"),
|
|
||||||
)
|
|
||||||
|
|
||||||
val SEASON_LIST = arrayOf(
|
|
||||||
Pair("<select>", ""),
|
|
||||||
Pair("Latest season", "new-season.html"),
|
|
||||||
Pair("Spring 2024", "sub-category/spring-2024-anime"),
|
|
||||||
Pair("Winter 2024", "sub-category/winter-2024-anime"),
|
|
||||||
Pair("Fall 2023", "sub-category/fall-2023-anime"),
|
|
||||||
Pair("Summer 2023", "sub-category/summer-2023-anime"),
|
|
||||||
Pair("Spring 2023", "sub-category/spring-2023-anime"),
|
|
||||||
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"),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue