feat(es/cuevana): Add new source (#2060)
This commit is contained in:
@ -1,11 +1,12 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlinx-serialization'
|
||||
|
||||
ext {
|
||||
extName = 'Cuevana'
|
||||
pkgNameSuffix = 'es.cuevana'
|
||||
extClass = '.Cuevana'
|
||||
extVersionCode = 19
|
||||
extClass = '.CuevanaFactory'
|
||||
extVersionCode = 20
|
||||
libVersion = '13'
|
||||
}
|
||||
|
||||
@ -15,6 +16,7 @@ dependencies {
|
||||
implementation project(path: ':lib-okru-extractor')
|
||||
implementation project(path: ':lib-voe-extractor')
|
||||
implementation project(path: ':lib-streamtape-extractor')
|
||||
implementation project(path: ':lib-filemoon-extractor')
|
||||
implementation "dev.datlag.jsunpacker:jsunpacker:1.0.1"
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,6 @@ import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor
|
||||
import eu.kanade.tachiyomi.lib.youruploadextractor.YourUploadExtractor
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import kotlinx.serialization.decodeFromString
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.JsonObject
|
||||
import kotlinx.serialization.json.jsonPrimitive
|
||||
@ -33,11 +32,7 @@ import uy.kohesive.injekt.api.get
|
||||
import uy.kohesive.injekt.injectLazy
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
class Cuevana : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||
|
||||
override val name = "Cuevana"
|
||||
|
||||
override val baseUrl = "https://www12.cuevana3.ch"
|
||||
class CuevanaCh(override val name: String, override val baseUrl: String) : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||
|
||||
override val lang = "es"
|
||||
|
||||
@ -196,24 +191,21 @@ class Cuevana : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||
override fun videoFromElement(element: Element) = throw Exception("not used")
|
||||
|
||||
override fun List<Video>.sort(): List<Video> {
|
||||
return try {
|
||||
val videoSorted = this.sortedWith(
|
||||
compareBy<Video> { it.quality.replace("[0-9]".toRegex(), "") }.thenByDescending { getNumberFromString(it.quality) },
|
||||
).toTypedArray()
|
||||
val userPreferredQuality = preferences.getString("preferred_quality", "Voex")
|
||||
val preferredIdx = videoSorted.indexOfFirst { x -> x.quality == userPreferredQuality }
|
||||
if (preferredIdx != -1) {
|
||||
videoSorted.drop(preferredIdx + 1)
|
||||
videoSorted[0] = videoSorted[preferredIdx]
|
||||
val quality = preferences.getString("preferred_quality", "Voex")
|
||||
if (quality != null) {
|
||||
val newList = mutableListOf<Video>()
|
||||
var preferred = 0
|
||||
for (video in this) {
|
||||
if (video.quality == quality) {
|
||||
newList.add(preferred, video)
|
||||
preferred++
|
||||
} else {
|
||||
newList.add(video)
|
||||
}
|
||||
}
|
||||
videoSorted.toList()
|
||||
} catch (e: Exception) {
|
||||
this
|
||||
return newList
|
||||
}
|
||||
}
|
||||
|
||||
private fun getNumberFromString(epsStr: String): String {
|
||||
return epsStr.filter { it.isDigit() }.ifEmpty { "0" }
|
||||
return this
|
||||
}
|
||||
|
||||
override fun searchAnimeRequest(page: Int, query: String, filters: AnimeFilterList): Request {
|
@ -0,0 +1,366 @@
|
||||
package eu.kanade.tachiyomi.animeextension.es.cuevana
|
||||
|
||||
import android.app.Application
|
||||
import android.content.SharedPreferences
|
||||
import androidx.preference.ListPreference
|
||||
import androidx.preference.PreferenceScreen
|
||||
import eu.kanade.tachiyomi.animeextension.es.cuevana.extractors.StreamWishExtractor
|
||||
import eu.kanade.tachiyomi.animeextension.es.cuevana.models.AnimeEpisodesList
|
||||
import eu.kanade.tachiyomi.animeextension.es.cuevana.models.PopularAnimeList
|
||||
import eu.kanade.tachiyomi.animeextension.es.cuevana.models.Videos
|
||||
import eu.kanade.tachiyomi.animesource.ConfigurableAnimeSource
|
||||
import eu.kanade.tachiyomi.animesource.model.AnimeFilter
|
||||
import eu.kanade.tachiyomi.animesource.model.AnimeFilterList
|
||||
import eu.kanade.tachiyomi.animesource.model.AnimesPage
|
||||
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.filemoonextractor.FilemoonExtractor
|
||||
import eu.kanade.tachiyomi.lib.okruextractor.OkruExtractor
|
||||
import eu.kanade.tachiyomi.lib.streamtapeextractor.StreamTapeExtractor
|
||||
import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor
|
||||
import eu.kanade.tachiyomi.lib.youruploadextractor.YourUploadExtractor
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.util.asJsoup
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.awaitAll
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.JsonObject
|
||||
import kotlinx.serialization.json.jsonPrimitive
|
||||
import okhttp3.OkHttpClient
|
||||
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
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
class CuevanaEu(override val name: String, override val baseUrl: String) : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
|
||||
|
||||
override val lang = "es"
|
||||
|
||||
override val supportsLatest = false
|
||||
|
||||
private val json = Json {
|
||||
ignoreUnknownKeys = true
|
||||
}
|
||||
|
||||
override val client: OkHttpClient = network.cloudflareClient
|
||||
|
||||
private val preferences: SharedPreferences by lazy {
|
||||
Injekt.get<Application>().getSharedPreferences("source_$id", 0x0000)
|
||||
}
|
||||
|
||||
override fun popularAnimeSelector(): String = ".MovieList .TPostMv .TPost"
|
||||
|
||||
override fun popularAnimeRequest(page: Int): Request = GET("$baseUrl/peliculas/estrenos/page/$page")
|
||||
|
||||
override fun popularAnimeFromElement(element: Element) = throw Exception("not used")
|
||||
|
||||
override fun popularAnimeParse(response: Response): AnimesPage {
|
||||
val document = response.asJsoup()
|
||||
val animeList = mutableListOf<SAnime>()
|
||||
val hasNextPage = document.select("nav.navigation > div.nav-links > a.next.page-numbers").any()
|
||||
val script = document.selectFirst("script:containsData({\"props\":{\"pageProps\":{)")!!.data()
|
||||
|
||||
val responseJson = json.decodeFromString<PopularAnimeList>(script)
|
||||
responseJson.props?.pageProps?.movies?.map { animeItem ->
|
||||
val anime = SAnime.create()
|
||||
val preSlug = animeItem.url?.slug ?: ""
|
||||
val type = if (preSlug.startsWith("series")) "serie" else "pelicula"
|
||||
|
||||
anime.title = animeItem.titles?.name ?: ""
|
||||
anime.thumbnail_url = animeItem.images?.poster?.replace("/original/", "/w200/") ?: ""
|
||||
anime.description = animeItem.overview
|
||||
anime.setUrlWithoutDomain("/$type/${animeItem.slug?.name}")
|
||||
animeList.add(anime)
|
||||
}
|
||||
|
||||
return AnimesPage(animeList, hasNextPage)
|
||||
}
|
||||
|
||||
override fun popularAnimeNextPageSelector(): String = "uwu"
|
||||
|
||||
override fun episodeListParse(response: Response): List<SEpisode> {
|
||||
val episodes = mutableListOf<SEpisode>()
|
||||
val document = response.asJsoup()
|
||||
if (response.request.url.toString().contains("/serie/")) {
|
||||
val script = document.selectFirst("script:containsData({\"props\":{\"pageProps\":{)")!!.data()
|
||||
val responseJson = json.decodeFromString<AnimeEpisodesList>(script)
|
||||
responseJson.props?.pageProps?.thisSerie?.seasons?.map {
|
||||
it.episodes.map { ep ->
|
||||
val episode = SEpisode.create()
|
||||
val epDate = try {
|
||||
ep.releaseDate?.substringBefore("T")?.let { date -> SimpleDateFormat("yyyy-MM-dd").parse(date) }
|
||||
} catch (e: Exception) {
|
||||
null
|
||||
}
|
||||
if (epDate != null) episode.date_upload = epDate.time
|
||||
episode.name = "T${ep.slug?.season} - Episodio ${ep.slug?.episode}"
|
||||
episode.episode_number = ep.number?.toFloat()!!
|
||||
episode.setUrlWithoutDomain("/episodio/${ep.slug?.name}-temporada-${ep.slug?.season}-episodio-${ep.slug?.episode}")
|
||||
episodes.add(episode)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
val episode = SEpisode.create().apply {
|
||||
episode_number = 1f
|
||||
name = "PELÍCULA"
|
||||
}
|
||||
episode.setUrlWithoutDomain(response.request.url.toString())
|
||||
episodes.add(episode)
|
||||
}
|
||||
return episodes.reversed()
|
||||
}
|
||||
|
||||
override fun episodeListSelector() = throw Exception("not used")
|
||||
|
||||
override fun episodeFromElement(element: Element) = throw Exception("not used")
|
||||
|
||||
override fun videoListParse(response: Response): List<Video> {
|
||||
val document = response.asJsoup()
|
||||
val videoList = mutableListOf<Video>()
|
||||
val script = document.selectFirst("script:containsData({\"props\":{\"pageProps\":{)")!!.data()
|
||||
val responseJson = json.decodeFromString<AnimeEpisodesList>(script)
|
||||
if (response.request.url.toString().contains("/episodio/")) {
|
||||
serverIterator(responseJson.props?.pageProps?.episode?.videos).let {
|
||||
videoList.addAll(it)
|
||||
}
|
||||
} else {
|
||||
serverIterator(responseJson.props?.pageProps?.thisMovie?.videos).let {
|
||||
videoList.addAll(it)
|
||||
}
|
||||
}
|
||||
return videoList
|
||||
}
|
||||
|
||||
private fun <A, B> Iterable<A>.parallelMap(f: suspend (A) -> B): List<B> =
|
||||
runBlocking {
|
||||
map { async(Dispatchers.Default) { f(it) } }.awaitAll()
|
||||
}
|
||||
|
||||
private fun serverIterator(videos: Videos?): MutableList<Video> {
|
||||
val videoList = mutableListOf<Video>()
|
||||
videos?.latino?.parallelMap {
|
||||
try {
|
||||
val body = client.newCall(GET(it.result!!)).execute().asJsoup()
|
||||
val url = body.selectFirst("script:containsData(var message)")?.data()?.substringAfter("var url = '")?.substringBefore("'") ?: ""
|
||||
loadExtractor(url, "[LAT]").let { videoList.addAll(it) }
|
||||
} catch (_: Exception) { }
|
||||
}
|
||||
videos?.spanish?.map {
|
||||
try {
|
||||
val body = client.newCall(GET(it.result!!)).execute().asJsoup()
|
||||
val url = body.selectFirst("script:containsData(var message)")?.data()?.substringAfter("var url = '")?.substringBefore("'") ?: ""
|
||||
loadExtractor(url, "[CAST]").let { videoList.addAll(it) }
|
||||
} catch (_: Exception) { }
|
||||
}
|
||||
videos?.english?.map {
|
||||
try {
|
||||
val body = client.newCall(GET(it.result!!)).execute().asJsoup()
|
||||
val url = body.selectFirst("script:containsData(var message)")?.data()?.substringAfter("var url = '")?.substringBefore("'") ?: ""
|
||||
loadExtractor(url, "[ENG]").let { videoList.addAll(it) }
|
||||
} catch (_: Exception) { }
|
||||
}
|
||||
videos?.japanese?.map {
|
||||
val body = client.newCall(GET(it.result!!)).execute().asJsoup()
|
||||
val url = body.selectFirst("script:containsData(var message)")?.data()?.substringAfter("var url = '")?.substringBefore("'") ?: ""
|
||||
loadExtractor(url, "[JAP]").let { videoList.addAll(it) }
|
||||
}
|
||||
return videoList
|
||||
}
|
||||
|
||||
private fun loadExtractor(url: String, prefix: String = ""): List<Video> {
|
||||
val videoList = mutableListOf<Video>()
|
||||
val embedUrl = url.lowercase()
|
||||
if (embedUrl.contains("tomatomatela")) {
|
||||
try {
|
||||
val mainUrl = url.substringBefore("/embed.html#").substringAfter("https://")
|
||||
val headers = headers.newBuilder()
|
||||
.set("authority", mainUrl)
|
||||
.set("accept", "application/json, text/javascript, */*; q=0.01")
|
||||
.set("accept-language", "es-MX,es-419;q=0.9,es;q=0.8,en;q=0.7")
|
||||
.set("sec-ch-ua", "\"Chromium\";v=\"106\", \"Google Chrome\";v=\"106\", \"Not;A=Brand\";v=\"99\"")
|
||||
.set("sec-ch-ua-mobile", "?0")
|
||||
.set("sec-ch-ua-platform", "Windows")
|
||||
.set("sec-fetch-dest", "empty")
|
||||
.set("sec-fetch-mode", "cors")
|
||||
.set("sec-fetch-site", "same-origin")
|
||||
.set("x-requested-with", "XMLHttpRequest")
|
||||
.build()
|
||||
val token = url.substringAfter("/embed.html#")
|
||||
val urlRequest = "https://$mainUrl/details.php?v=$token"
|
||||
val response = client.newCall(GET(urlRequest, headers = headers)).execute().asJsoup()
|
||||
val bodyText = response.select("body").text()
|
||||
val json = json.decodeFromString<JsonObject>(bodyText)
|
||||
val status = json["status"]!!.jsonPrimitive!!.content
|
||||
val file = json["file"]!!.jsonPrimitive!!.content
|
||||
if (status == "200") { videoList.add(Video(file, "$prefix Tomatomatela", file, headers = null)) }
|
||||
} catch (_: Exception) { }
|
||||
}
|
||||
if (embedUrl.contains("yourupload")) {
|
||||
val videos = YourUploadExtractor(client).videoFromUrl(url, headers = headers)
|
||||
videoList.addAll(videos)
|
||||
}
|
||||
if (embedUrl.contains("doodstream") || embedUrl.contains("dood.")) {
|
||||
DoodExtractor(client).videoFromUrl(url, "$prefix DoodStream", false)
|
||||
?.let { videoList.add(it) }
|
||||
}
|
||||
if (embedUrl.contains("okru") || embedUrl.contains("ok.ru")) {
|
||||
OkruExtractor(client).videosFromUrl(url, prefix, true).also(videoList::addAll)
|
||||
}
|
||||
if (embedUrl.contains("voe")) {
|
||||
VoeExtractor(client).videoFromUrl(url, "$prefix Voex")?.let { videoList.add(it) }
|
||||
}
|
||||
if (embedUrl.contains("streamtape")) {
|
||||
StreamTapeExtractor(client).videoFromUrl(url, "$prefix StreamTape")?.let { videoList.add(it) }
|
||||
}
|
||||
if (embedUrl.contains("wishembed") || embedUrl.contains("streamwish") || embedUrl.contains("wish")) {
|
||||
StreamWishExtractor(client, headers).videosFromUrl(url, "$prefix StreamWish:").also(videoList::addAll)
|
||||
}
|
||||
if (embedUrl.contains("filemoon") || embedUrl.contains("moonplayer")) {
|
||||
FilemoonExtractor(client).videosFromUrl(url, "$prefix Filemoon:").also(videoList::addAll)
|
||||
}
|
||||
return videoList
|
||||
}
|
||||
|
||||
override fun videoListSelector() = throw Exception("not used")
|
||||
|
||||
override fun videoUrlParse(document: Document) = throw Exception("not used")
|
||||
|
||||
override fun videoFromElement(element: Element) = throw Exception("not used")
|
||||
|
||||
override fun List<Video>.sort(): List<Video> {
|
||||
val quality = preferences.getString("preferred_quality", "Voex")
|
||||
if (quality != null) {
|
||||
val newList = mutableListOf<Video>()
|
||||
var preferred = 0
|
||||
for (video in this) {
|
||||
if (video.quality == quality) {
|
||||
newList.add(preferred, video)
|
||||
preferred++
|
||||
} else {
|
||||
newList.add(video)
|
||||
}
|
||||
}
|
||||
return newList
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
override fun searchAnimeRequest(page: Int, query: String, filters: AnimeFilterList): Request {
|
||||
val filterList = if (filters.isEmpty()) getFilterList() else filters
|
||||
val genreFilter = filterList.find { it is GenreFilter } as GenreFilter
|
||||
|
||||
return when {
|
||||
query.isNotBlank() -> GET("$baseUrl/search?q=$query", headers)
|
||||
genreFilter.state != 0 -> GET("$baseUrl/${genreFilter.toUriPart()}/page/$page")
|
||||
else -> popularAnimeRequest(page)
|
||||
}
|
||||
}
|
||||
|
||||
override fun searchAnimeParse(response: Response) = popularAnimeParse(response)
|
||||
|
||||
override fun searchAnimeFromElement(element: Element) = popularAnimeFromElement(element)
|
||||
|
||||
override fun searchAnimeNextPageSelector(): String = popularAnimeNextPageSelector()
|
||||
|
||||
override fun searchAnimeSelector(): String = popularAnimeSelector()
|
||||
|
||||
override fun animeDetailsParse(document: Document) = throw Exception("not used")
|
||||
|
||||
override fun animeDetailsParse(response: Response): SAnime {
|
||||
val document = response.asJsoup()
|
||||
val newAnime = SAnime.create()
|
||||
val script = document.selectFirst("script:containsData({\"props\":{\"pageProps\":{)")!!.data()
|
||||
val responseJson = json.decodeFromString<AnimeEpisodesList>(script)
|
||||
if (response.request.url.toString().contains("/serie/")) {
|
||||
val data = responseJson.props?.pageProps?.thisSerie
|
||||
newAnime.status = SAnime.UNKNOWN
|
||||
newAnime.title = data?.titles?.name ?: ""
|
||||
newAnime.description = data?.overview ?: ""
|
||||
newAnime.thumbnail_url = data?.images?.poster?.replace("/original/", "/w500/")
|
||||
newAnime.genre = data?.genres?.joinToString { it.name ?: "" }
|
||||
newAnime.setUrlWithoutDomain(response.request.url.toString())
|
||||
} else {
|
||||
val data = responseJson.props?.pageProps?.thisMovie
|
||||
newAnime.status = SAnime.UNKNOWN
|
||||
newAnime.title = data?.titles?.name ?: ""
|
||||
newAnime.description = data?.overview ?: ""
|
||||
newAnime.thumbnail_url = data?.images?.poster?.replace("/original/", "/w500/")
|
||||
newAnime.genre = data?.genres?.joinToString { it.name ?: "" }
|
||||
newAnime.setUrlWithoutDomain(response.request.url.toString())
|
||||
}
|
||||
|
||||
return newAnime
|
||||
}
|
||||
|
||||
override fun latestUpdatesNextPageSelector() = throw Exception("not used")
|
||||
|
||||
override fun latestUpdatesFromElement(element: Element) = throw Exception("not used")
|
||||
|
||||
override fun latestUpdatesRequest(page: Int) = throw Exception("not used")
|
||||
|
||||
override fun latestUpdatesSelector() = throw Exception("not used")
|
||||
|
||||
override fun getFilterList(): AnimeFilterList = AnimeFilterList(
|
||||
AnimeFilter.Header("La busqueda por texto ignora el filtro"),
|
||||
GenreFilter(),
|
||||
)
|
||||
|
||||
private class GenreFilter : UriPartFilter(
|
||||
"Tipos",
|
||||
arrayOf(
|
||||
Pair("<selecionar>", ""),
|
||||
Pair("Series", "series/estrenos"),
|
||||
Pair("Acción", "genero/accion"),
|
||||
Pair("Aventura", "genero/aventura"),
|
||||
Pair("Animación", "genero/animacion"),
|
||||
Pair("Ciencia Ficción", "genero/ciencia-ficcion"),
|
||||
Pair("Comedia", "genero/comedia"),
|
||||
Pair("Crimen", "genero/crimen"),
|
||||
Pair("Documentales", "genero/documental"),
|
||||
Pair("Drama", "genero/drama"),
|
||||
Pair("Familia", "genero/familia"),
|
||||
Pair("Fantasía", "genero/fantasia"),
|
||||
Pair("Misterio", "genero/misterio"),
|
||||
Pair("Romance", "genero/romance"),
|
||||
Pair("Suspenso", "genero/suspense"),
|
||||
Pair("Terror", "genero/terror"),
|
||||
),
|
||||
)
|
||||
|
||||
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
||||
AnimeFilter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
||||
fun toUriPart() = vals[state].second
|
||||
}
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) {
|
||||
val qualities = arrayOf(
|
||||
"Streamlare:1080p", "Streamlare:720p", "Streamlare:480p", "Streamlare:360p", "Streamlare:240p", // Streamlare}
|
||||
"Okru:1080p", "Okru:720p", "Okru:480p", "Okru:360p", "Okru:240p", // Okru
|
||||
"StreamTape", "Amazon", "Voex", "DoodStream", "YourUpload", "Filemoon", "StreamWish", "Tomatomatela", "YourUpload",
|
||||
)
|
||||
val videoQualityPref = ListPreference(screen.context).apply {
|
||||
key = "preferred_quality"
|
||||
title = "Preferred quality"
|
||||
entries = qualities
|
||||
entryValues = qualities
|
||||
setDefaultValue("Voex")
|
||||
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()
|
||||
}
|
||||
}
|
||||
screen.addPreference(videoQualityPref)
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package eu.kanade.tachiyomi.animeextension.es.cuevana
|
||||
|
||||
import eu.kanade.tachiyomi.animesource.AnimeSource
|
||||
import eu.kanade.tachiyomi.animesource.AnimeSourceFactory
|
||||
|
||||
class CuevanaFactory : AnimeSourceFactory {
|
||||
override fun createSources(): List<AnimeSource> = listOf(
|
||||
CuevanaCh("Cuevana3Ch", "https://www12.cuevana3.ch"),
|
||||
CuevanaEu("Cuevana3Eu", "https://www.cuevana-3.eu"),
|
||||
)
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package eu.kanade.tachiyomi.animeextension.es.cuevana.models
|
||||
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class AnimeEpisodesList(
|
||||
@SerialName("props") var props: Props? = Props(),
|
||||
@SerialName("page") var page: String? = null,
|
||||
@SerialName("query") var query: Query? = Query(),
|
||||
@SerialName("buildId") var buildId: String? = null,
|
||||
@SerialName("isFallback") var isFallback: Boolean? = null,
|
||||
@SerialName("gsp") var gsp: Boolean? = null,
|
||||
@SerialName("locale") var locale: String? = null,
|
||||
@SerialName("locales") var locales: ArrayList<String> = arrayListOf(),
|
||||
@SerialName("defaultLocale") var defaultLocale: String? = null,
|
||||
@SerialName("scriptLoader") var scriptLoader: ArrayList<String> = arrayListOf(),
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Episodes(
|
||||
@SerialName("title") var title: String? = null,
|
||||
@SerialName("TMDbId") var TMDbId: String? = null,
|
||||
@SerialName("number") var number: Int? = null,
|
||||
@SerialName("releaseDate") var releaseDate: String? = null,
|
||||
@SerialName("image") var image: String? = null,
|
||||
@SerialName("url") var url: Url? = Url(),
|
||||
@SerialName("slug") var slug: Slug? = Slug(),
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Seasons(
|
||||
@SerialName("number") var number: Int? = null,
|
||||
@SerialName("episodes") var episodes: ArrayList<Episodes> = arrayListOf(),
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Original(
|
||||
@SerialName("name") var name: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class ThisSerie(
|
||||
@SerialName("TMDbId") var TMDbId: String? = null,
|
||||
@SerialName("seasons") var seasons: ArrayList<Seasons> = arrayListOf(),
|
||||
@SerialName("titles") var titles: Titles? = Titles(),
|
||||
@SerialName("images") var images: Images? = Images(),
|
||||
@SerialName("overview") var overview: String? = null,
|
||||
@SerialName("genres") var genres: ArrayList<Genres> = arrayListOf(),
|
||||
@SerialName("cast") var cast: Cast? = Cast(),
|
||||
@SerialName("rate") var rate: Rate? = Rate(),
|
||||
@SerialName("url") var url: Url? = Url(),
|
||||
@SerialName("slug") var slug: Slug? = Slug(),
|
||||
@SerialName("releaseDate") var releaseDate: String? = null,
|
||||
)
|
@ -0,0 +1,176 @@
|
||||
package eu.kanade.tachiyomi.animeextension.es.cuevana.models
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class PopularAnimeList(
|
||||
@SerialName("props") var props: Props? = Props(),
|
||||
@SerialName("page") var page: String? = null,
|
||||
@SerialName("query") var query: Query? = Query(),
|
||||
@SerialName("buildId") var buildId: String? = null,
|
||||
@SerialName("isFallback") var isFallback: Boolean? = null,
|
||||
@SerialName("gsp") var gsp: Boolean? = null,
|
||||
@SerialName("locale") var locale: String? = null,
|
||||
@SerialName("locales") var locales: ArrayList<String> = arrayListOf(),
|
||||
@SerialName("defaultLocale") var defaultLocale: String? = null,
|
||||
@SerialName("scriptLoader") var scriptLoader: ArrayList<String> = arrayListOf(),
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Titles(
|
||||
@SerialName("name") var name: String? = null,
|
||||
@SerialName("original") var original: Original? = Original(),
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Images(
|
||||
@SerialName("poster") var poster: String? = null,
|
||||
@SerialName("backdrop") var backdrop: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Rate(
|
||||
@SerialName("average") var average: Double? = null,
|
||||
@SerialName("votes") var votes: Int? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Genres(
|
||||
@SerialName("id") var id: String? = null,
|
||||
@SerialName("slug") var slug: String? = null,
|
||||
@SerialName("name") var name: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Acting(
|
||||
@SerialName("id") var id: String? = null,
|
||||
@SerialName("name") var name: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Cast(
|
||||
@SerialName("acting") var acting: ArrayList<Acting> = arrayListOf(),
|
||||
@SerialName("directing") var directing: ArrayList<Directing> = arrayListOf(),
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Url(
|
||||
@SerialName("slug") var slug: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Slug(
|
||||
@SerialName("name") var name: String? = null,
|
||||
@SerialName("season") var season: String? = null,
|
||||
@SerialName("episode") var episode: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Movies(
|
||||
@SerialName("titles") var titles: Titles? = Titles(),
|
||||
@SerialName("images") var images: Images? = Images(),
|
||||
@SerialName("rate") var rate: Rate? = Rate(),
|
||||
@SerialName("overview") var overview: String? = null,
|
||||
@SerialName("TMDbId") var TMDbId: String? = null,
|
||||
@SerialName("genres") var genres: ArrayList<Genres> = arrayListOf(),
|
||||
@SerialName("cast") var cast: Cast? = Cast(),
|
||||
@SerialName("runtime") var runtime: Int? = null,
|
||||
@SerialName("releaseDate") var releaseDate: String? = null,
|
||||
@SerialName("url") var url: Url? = Url(),
|
||||
@SerialName("slug") var slug: Slug? = Slug(),
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class PageProps(
|
||||
@SerialName("thisSerie") var thisSerie: ThisSerie? = ThisSerie(),
|
||||
@SerialName("thisMovie") var thisMovie: ThisMovie? = ThisMovie(),
|
||||
@SerialName("movies") var movies: ArrayList<Movies> = arrayListOf(),
|
||||
@SerialName("pages") var pages: Int? = null,
|
||||
@SerialName("season") var season: Season? = Season(),
|
||||
@SerialName("episode") var episode: Episode? = Episode(),
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Props(
|
||||
@SerialName("pageProps") var pageProps: PageProps? = PageProps(),
|
||||
@SerialName("__N_SSG") var _NSSG: Boolean? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Query(
|
||||
@SerialName("page") var page: String? = null,
|
||||
@SerialName("serie") var serie: String? = null,
|
||||
@SerialName("movie") var movie: String? = null,
|
||||
@SerialName("episode") var episode: String? = null,
|
||||
@SerialName("q") var q: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Directing(
|
||||
@SerialName("name") var name: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Server(
|
||||
@SerialName("cyberlocker") var cyberlocker: String? = null,
|
||||
@SerialName("result") var result: String? = null,
|
||||
@SerialName("quality") var quality: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Videos(
|
||||
@SerialName("latino") var latino: ArrayList<Server> = arrayListOf(),
|
||||
@SerialName("spanish") var spanish: ArrayList<Server> = arrayListOf(),
|
||||
@SerialName("english") var english: ArrayList<Server> = arrayListOf(),
|
||||
@SerialName("japanese") var japanese: ArrayList<Server> = arrayListOf(),
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Downloads(
|
||||
@SerialName("cyberlocker") var cyberlocker: String? = null,
|
||||
@SerialName("result") var result: String? = null,
|
||||
@SerialName("quality") var quality: String? = null,
|
||||
@SerialName("language") var language: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class ThisMovie(
|
||||
@SerialName("TMDbId") var TMDbId: String? = null,
|
||||
@SerialName("titles") var titles: Titles? = Titles(),
|
||||
@SerialName("images") var images: Images? = Images(),
|
||||
@SerialName("overview") var overview: String? = null,
|
||||
@SerialName("runtime") var runtime: Int? = null,
|
||||
@SerialName("genres") var genres: ArrayList<Genres> = arrayListOf(),
|
||||
@SerialName("cast") var cast: Cast? = Cast(),
|
||||
@SerialName("rate") var rate: Rate? = Rate(),
|
||||
@SerialName("url") var url: Url? = Url(),
|
||||
@SerialName("slug") var slug: Slug? = Slug(),
|
||||
@SerialName("releaseDate") var releaseDate: String? = null,
|
||||
@SerialName("videos") var videos: Videos? = Videos(),
|
||||
@SerialName("downloads") var downloads: ArrayList<Downloads> = arrayListOf(),
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Season(
|
||||
@SerialName("number") var number: Int? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class NextEpisode(
|
||||
@SerialName("title") var title: String? = null,
|
||||
@SerialName("slug") var slug: String? = null,
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class Episode(
|
||||
@SerialName("TMDbId") var TMDbId: String? = null,
|
||||
@SerialName("title") var title: String? = null,
|
||||
@SerialName("number") var number: Int? = null,
|
||||
@SerialName("image") var image: String? = null,
|
||||
@SerialName("url") var url: Url? = Url(),
|
||||
@SerialName("slug") var slug: Slug? = Slug(),
|
||||
@SerialName("nextEpisode") var nextEpisode: NextEpisode? = NextEpisode(),
|
||||
@SerialName("previousEpisode") var previousEpisode: String? = null,
|
||||
@SerialName("videos") var videos: Videos? = Videos(),
|
||||
@SerialName("downloads") var downloads: ArrayList<Downloads> = arrayListOf(),
|
||||
)
|
Reference in New Issue
Block a user