From 55c970dc6ff29ea79327ed657118f5034f6f6bd2 Mon Sep 17 00:00:00 2001 From: imper1aldev Date: Sat, 21 Oct 2023 14:01:29 -0600 Subject: [PATCH 01/11] updates --- .../lib/voeextractor/VoeExtractor.kt | 7 +- src/es/animeflv/build.gradle | 3 +- .../animeextension/es/animeflv/AnimeFlv.kt | 100 +++--- src/es/animemovil/build.gradle | 2 +- .../es/animemovil/AnimeMovil.kt | 99 +++--- src/es/cuevana/build.gradle | 18 +- .../animeextension/es/cuevana/CuevanaCh.kt | 273 +++++++++++------ .../es/cuevana/CuevanaFactory.kt | 4 +- src/es/gnula/build.gradle | 11 +- .../animeextension/es/gnula/Gnula.kt | 287 +++++++++++------- src/es/hentaila/build.gradle | 4 +- .../hentaila/res/mipmap-hdpi/ic_launcher.png | Bin 11997 -> 2226 bytes .../hentaila/res/mipmap-mdpi/ic_launcher.png | Bin 11997 -> 1197 bytes .../hentaila/res/mipmap-xhdpi/ic_launcher.png | Bin 11997 -> 2815 bytes .../res/mipmap-xxhdpi/ic_launcher.png | Bin 11997 -> 4764 bytes .../res/mipmap-xxxhdpi/ic_launcher.png | Bin 11997 -> 7021 bytes .../animeextension/es/hentaila/Hentaila.kt | 125 ++++---- src/es/jkanime/build.gradle | 3 +- .../animeextension/es/jkanime/Jkanime.kt | 124 +++++--- src/es/locopelis/build.gradle | 2 +- .../animeextension/es/locopelis/LocoPelis.kt | 95 +++--- src/es/metroseries/build.gradle | 2 +- .../es/metroseries/MetroSeries.kt | 199 ++++++++---- src/es/pelisforte/build.gradle | 2 +- .../es/pelisforte/PelisForte.kt | 8 +- src/es/pelisplushd/build.gradle | 7 +- .../es/pelisplushd/Pelisplushd.kt | 287 +++++++++++------- .../es/pelisplushd/Pelisplusph.kt | 253 ++++++++++----- .../es/pelisplushd/Pelisplusto.kt | 240 ++++++++++----- 29 files changed, 1362 insertions(+), 793 deletions(-) diff --git a/lib/voe-extractor/src/main/java/eu/kanade/tachiyomi/lib/voeextractor/VoeExtractor.kt b/lib/voe-extractor/src/main/java/eu/kanade/tachiyomi/lib/voeextractor/VoeExtractor.kt index 5bda3d466e..53a86fc819 100644 --- a/lib/voe-extractor/src/main/java/eu/kanade/tachiyomi/lib/voeextractor/VoeExtractor.kt +++ b/lib/voe-extractor/src/main/java/eu/kanade/tachiyomi/lib/voeextractor/VoeExtractor.kt @@ -6,14 +6,17 @@ import eu.kanade.tachiyomi.util.asJsoup import okhttp3.OkHttpClient class VoeExtractor(private val client: OkHttpClient) { - fun videoFromUrl(url: String, quality: String? = null): Video? { + fun videoFromUrl(url: String, quality: String? = null, prefix: String = ""): Video? { val document = client.newCall(GET(url)).execute().asJsoup() val script = document.selectFirst("script:containsData(const sources),script:containsData(var sources)") ?.data() ?: return null val videoUrl = script.substringAfter("hls': '").substringBefore("'") val resolution = script.substringAfter("video_height': ").substringBefore(",") - val qualityStr = quality ?: "VoeCDN(${resolution}p)" + val qualityStr = when { + prefix.isNotEmpty() -> "$prefix${resolution}p" + else -> quality ?: "VoeCDN(${resolution}p)" + } return Video(url, qualityStr, videoUrl) } } diff --git a/src/es/animeflv/build.gradle b/src/es/animeflv/build.gradle index f544349c9c..7a3e7be740 100644 --- a/src/es/animeflv/build.gradle +++ b/src/es/animeflv/build.gradle @@ -1,11 +1,12 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' +apply plugin: 'kotlinx-serialization' ext { extName = 'AnimeFLV' pkgNameSuffix = 'es.animeflv' extClass = '.AnimeFlv' - extVersionCode = 50 + extVersionCode = 51 libVersion = '13' } diff --git a/src/es/animeflv/src/eu/kanade/tachiyomi/animeextension/es/animeflv/AnimeFlv.kt b/src/es/animeflv/src/eu/kanade/tachiyomi/animeextension/es/animeflv/AnimeFlv.kt index 25e17772ba..49db2620e9 100644 --- a/src/es/animeflv/src/eu/kanade/tachiyomi/animeextension/es/animeflv/AnimeFlv.kt +++ b/src/es/animeflv/src/eu/kanade/tachiyomi/animeextension/es/animeflv/AnimeFlv.kt @@ -41,7 +41,7 @@ class AnimeFlv : ConfigurableAnimeSource, ParsedAnimeHttpSource() { override val lang = "es" - override val supportsLatest = false + override val supportsLatest = true override val client: OkHttpClient = network.cloudflareClient @@ -51,24 +51,30 @@ class AnimeFlv : ConfigurableAnimeSource, ParsedAnimeHttpSource() { Injekt.get().getSharedPreferences("source_$id", 0x0000) } + companion object { + private const val PREF_QUALITY_KEY = "preferred_quality" + private const val PREF_QUALITY_DEFAULT = "1080" + private val QUALITY_LIST = arrayOf("1080", "720", "480", "360") + + private const val PREF_SERVER_KEY = "preferred_server" + private const val PREF_SERVER_DEFAULT = "YourUpload" + private val SERVER_LIST = arrayOf("MailRu", "Okru", "YourUpload", "DoodStream", "StreamTape") + } + override fun popularAnimeSelector(): String = "div.Container ul.ListAnimes li article" override fun popularAnimeRequest(page: Int): Request = GET("$baseUrl/browse?order=rating&page=$page") override fun popularAnimeFromElement(element: Element): SAnime { val anime = SAnime.create() - anime.setUrlWithoutDomain( - baseUrl + element.select("div.Description a.Button") - .attr("href"), - ) + anime.setUrlWithoutDomain(element.select("div.Description a.Button").attr("abs:href")) anime.title = element.select("a h3").text() anime.thumbnail_url = try { element.select("a div.Image figure img").attr("src") } catch (e: Exception) { element.select("a div.Image figure img").attr("data-cfsrc") } - anime.description = - element.select("div.Description p:eq(2)").text().removeSurrounding("\"") + anime.description = element.select("div.Description p:eq(2)").text().removeSurrounding("\"") return anime } @@ -127,7 +133,7 @@ class AnimeFlv : ConfigurableAnimeSource, ParsedAnimeHttpSource() { val docHeaders = headers.newBuilder() .add("Referer", "$baseUrl/") .build() - StreamWishExtractor(client, docHeaders).videosFromUrl(url, "StreamWish") + StreamWishExtractor(client, docHeaders).videosFromUrl(url, videoNameGen = { "StreamWish:$it" }) } else -> null } @@ -145,27 +151,6 @@ class AnimeFlv : ConfigurableAnimeSource, ParsedAnimeHttpSource() { override fun videoFromElement(element: Element) = throw Exception("not used") - override fun List