chore(src): Multiple improvements and fixes (#233)

* Hackstore improvements

* VerAnimes improvements

* Pelisplushd improvements

* AnimeFenix improvements

* AnimeFlv Improvements

* AsiaLiveAction improvements

* TioAnime improvements and VidGuardExtractor added

* Replacing VidGuardExtractor files in extensions

* oppstrem fixed

Closes #220
This commit is contained in:
imper1aldev 2024-09-14 06:53:22 -06:00 committed by GitHub
parent 6dc7b288e6
commit 41a6b6c788
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
60 changed files with 1213 additions and 1432 deletions

View file

@ -1,7 +1,7 @@
ext {
extName = 'Cine24h'
extClass = '.Cine24h'
extVersionCode = 1
extVersionCode = 2
}
apply from: "$rootDir/common.gradle"
@ -11,4 +11,5 @@ dependencies {
implementation(project(':lib:dood-extractor'))
implementation(project(':lib:filemoon-extractor'))
implementation(project(':lib:voe-extractor'))
implementation(project(':lib:vidguard-extractor'))
}

View file

@ -15,6 +15,7 @@ import eu.kanade.tachiyomi.animesource.online.AnimeHttpSource
import eu.kanade.tachiyomi.lib.doodextractor.DoodExtractor
import eu.kanade.tachiyomi.lib.fastreamextractor.FastreamExtractor
import eu.kanade.tachiyomi.lib.filemoonextractor.FilemoonExtractor
import eu.kanade.tachiyomi.lib.vidguardextractor.VidGuardExtractor
import eu.kanade.tachiyomi.lib.voeextractor.VoeExtractor
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.util.asJsoup
@ -153,6 +154,7 @@ open class Cine24h : ConfigurableAnimeSource, AnimeHttpSource() {
private val filemoonExtractor by lazy { FilemoonExtractor(client) }
private val doodExtractor by lazy { DoodExtractor(client) }
private val voeExtractor by lazy { VoeExtractor(client) }
private val vidGuardExtractor by lazy { VidGuardExtractor(client) }
private fun serverVideoResolver(url: String): List<Video> {
val embedUrl = url.lowercase()
@ -161,9 +163,10 @@ open class Cine24h : ConfigurableAnimeSource, AnimeHttpSource() {
val link = if (url.contains("emb.html")) "https://fastream.to/embed-${url.split("/").last()}.html" else url
FastreamExtractor(client, headers).videosFromUrl(link)
}
embedUrl.contains("filemoon") || embedUrl.contains("moonplayer") -> filemoonExtractor.videosFromUrl(url, prefix = "Filemoon:")
embedUrl.contains("voe") -> voeExtractor.videosFromUrl(url)
embedUrl.contains("dood") -> doodExtractor.videosFromUrl(url)
arrayOf("filemoon", "moonplayer").any(url) -> filemoonExtractor.videosFromUrl(url, prefix = "Filemoon:")
arrayOf("voe").any(url) -> voeExtractor.videosFromUrl(url)
arrayOf("doodstream", "dood.", "ds2play", "doods.").any(url) -> doodExtractor.videosFromUrl(url)
arrayOf("vembed", "guard", "listeamed", "bembed", "vgfplay").any(url) -> vidGuardExtractor.videosFromUrl(url)
else -> emptyList()
}
}
@ -236,6 +239,8 @@ open class Cine24h : ConfigurableAnimeSource, AnimeHttpSource() {
return !attr(attrName).contains("data:image/")
}
private fun Array<String>.any(url: String): Boolean = this.any { url.contains(it, ignoreCase = true) }
override fun setupPreferenceScreen(screen: PreferenceScreen) {
ListPreference(screen.context).apply {
key = PREF_SERVER_KEY