fixed Animixplay main server

This commit is contained in:
hexated 2022-10-04 05:03:23 +07:00
parent cb45b2c159
commit 4f4755bf56
3 changed files with 20 additions and 8 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 3
version = 4
cloudstream {

View file

@ -188,7 +188,7 @@ class Animixplay : MainAPI() {
).parsedSafe<DataAni>()?.data?.media?.id
val res = app.get("$mainUrl/assets/mal/$malId.json").parsedSafe<AnimeDetail>()
?: throw ErrorLoadingException("Invalid json responses")
?: throw ErrorLoadingException("No data found")
val subEpisodes = mutableListOf<Episode>()
val dubEpisodes = mutableListOf<Episode>()

View file

@ -140,12 +140,24 @@ class GogoanimeProvider : MainAPI() {
source: GogoSource,
sourceCallback: (ExtractorLink) -> Unit
) {
M3u8Helper.generateM3u8(
mainApiName,
source.file,
mainUrl,
headers = mapOf("Origin" to "https://plyr.link")
).forEach(sourceCallback)
if (source.file.contains(".m3u8")) {
M3u8Helper.generateM3u8(
mainApiName,
source.file,
mainUrl,
headers = mapOf("Origin" to "https://plyr.link")
).forEach(sourceCallback)
} else {
sourceCallback.invoke(
ExtractorLink(
mainApiName,
mainApiName,
source.file,
mainUrl,
getQualityFromName(source.label),
)
)
}
}
sources.source?.forEach {