Merge branch 'Kohi-den:main' into main

This commit is contained in:
Zero 2025-05-12 17:42:58 +05:30 committed by GitHub
commit 9869f5e1d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,9 @@
ext {
extName = 'AniWatchtv'
extClass = '.AniWatchtv'
themePkg = 'zorotheme'
baseUrl = 'https://aniwatchtv.to'
overrideVersionCode = 1
}
apply from: "$rootDir/common.gradle"

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -0,0 +1,40 @@
package eu.kanade.tachiyomi.animeextension.en.aniwatch
import eu.kanade.tachiyomi.animesource.model.SAnime
import eu.kanade.tachiyomi.animesource.model.Video
import eu.kanade.tachiyomi.lib.megacloudextractor.MegaCloudExtractor
import eu.kanade.tachiyomi.multisrc.zorotheme.ZoroTheme
import eu.kanade.tachiyomi.network.GET
import okhttp3.Request
import org.jsoup.nodes.Element
class AniWatchtv : ZoroTheme(
"en",
"AniWatchtv",
"https://aniwatchtv.to",
hosterNames = listOf(
"VidSrc",
"MegaCloud",
),
) {
override val id = 8051984946387208343L
override val ajaxRoute = "/v2"
private val megaCloudExtractor by lazy { MegaCloudExtractor(client, headers, preferences) }
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/recently-updated?page=$page", docHeaders)
override fun popularAnimeFromElement(element: Element): SAnime {
return super.popularAnimeFromElement(element).apply {
url = url.substringBefore("?")
}
}
override fun extractVideo(server: VideoData): List<Video> {
return when (server.name) {
"VidSrc", "MegaCloud" -> megaCloudExtractor.getVideosFromUrl(server.link, server.type, server.name)
else -> emptyList()
}
}
}