mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed Aniworld
This commit is contained in:
parent
fa3a705a4b
commit
55aa05ac5f
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue