fixed Aniworld

This commit is contained in:
hexated 2023-06-30 10:44:04 +07:00
parent fa3a705a4b
commit 55aa05ac5f

View file

@ -146,11 +146,12 @@ class Aniworld : MainAPI() {
it.third != "Vidoza" it.third != "Vidoza"
}.apmap { }.apmap {
val redirectUrl = app.get(fixUrl(it.second)).url val redirectUrl = app.get(fixUrl(it.second)).url
val lang = it.first.getLanguage(document)
if (it.third == "VOE") { if (it.third == "VOE") {
invokeVoe(redirectUrl, data, callback) invokeVoe(redirectUrl, lang, data, callback)
} else { } else {
loadExtractor(redirectUrl, data, subtitleCallback) { link -> loadExtractor(redirectUrl, data, subtitleCallback) { link ->
val name = "${link.name} [${it.first.getLanguage(document)}]" val name = "${link.name} [${lang}]"
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
name, name,
@ -172,9 +173,11 @@ class Aniworld : MainAPI() {
private suspend fun invokeVoe( private suspend fun invokeVoe(
url: String, url: String,
lang: String?,
referer: String, referer: String,
callback: (ExtractorLink) -> Unit, callback: (ExtractorLink) -> Unit,
) { ) {
val name = "Voe [${lang}]"
val request = app.get(url, referer = referer) val request = app.get(url, referer = referer)
val baseUrl = getBaseUrl(request.url) val baseUrl = getBaseUrl(request.url)
val res = request.document val res = request.document