mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed Animixplay main server
This commit is contained in:
parent
de37a1a597
commit
2e12876f90
3 changed files with 20 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 3
|
||||
version = 4
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -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>()
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue