Update Toonitalia.kt

This commit is contained in:
Al3ss107 2024-08-24 11:40:26 +02:00 committed by GitHub
parent f19b930678
commit 0d741f95c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,7 +29,7 @@ class Toonitalia : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
override val name = "Toonitalia" override val name = "Toonitalia"
override val baseUrl = "https://toonitalia.green" override val baseUrl = "https://toonitalia.xyz"
override val lang = "it" override val lang = "it"
@ -189,6 +189,7 @@ class Toonitalia : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
} }
private val voeExtractor by lazy { VoeExtractor(client) } private val voeExtractor by lazy { VoeExtractor(client) }
private val StreamWishExtractor by lazy { StreamWishExtractor(client) }
private val streamZExtractor by lazy { StreamZExtractor(client) } private val streamZExtractor by lazy { StreamZExtractor(client) }
private val streamTapeExtractor by lazy { StreamTapeExtractor(client) } private val streamTapeExtractor by lazy { StreamTapeExtractor(client) }
private val maxStreamExtractor by lazy { MaxStreamExtractor(client, headers) } private val maxStreamExtractor by lazy { MaxStreamExtractor(client, headers) }
@ -196,6 +197,7 @@ class Toonitalia : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
private fun extractVideos(url: String): List<Video> = private fun extractVideos(url: String): List<Video> =
when { when {
"https://voe.sx" in url -> voeExtractor.videosFromUrl(url) "https://voe.sx" in url -> voeExtractor.videosFromUrl(url)
"https://StreamWish" in url -> StreamWishExtractor.videosFromUrl(url)
"https://streamtape" in url -> streamTapeExtractor.videoFromUrl(url)?.let(::listOf) "https://streamtape" in url -> streamTapeExtractor.videoFromUrl(url)?.let(::listOf)
"https://maxstream" in url -> maxStreamExtractor.videosFromUrl(url) "https://maxstream" in url -> maxStreamExtractor.videosFromUrl(url)
"https://streamz" in url || "streamz.cc" in url -> { "https://streamz" in url || "streamz.cc" in url -> {
@ -283,7 +285,7 @@ class Toonitalia : ConfigurableAnimeSource, ParsedAnimeHttpSource() {
.map { it.groupValues[1] } .map { it.groupValues[1] }
.toList() .toList()
.forEach { link -> .forEach { link ->
if (link.contains("https://maxstream.video") || link.contains("https://uprot.net") || link.contains("https://streamtape") || link.contains("https://voe") && link != url) { if (link.contains("https://maxstream.video") || link.contains("https://uprot.net") || link.contains("https://streamtape") || link.contains("https://voe") || link.contains("https://streamwish") && link != url) {
return link return link
} }
} }