mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: fix some sources
This commit is contained in:
parent
4bf526dc36
commit
47a2aa381a
8 changed files with 131 additions and 28 deletions
|
@ -147,16 +147,8 @@ class Anichi : MainAPI() {
|
|||
if (it == null) return@let Pair(null, null)
|
||||
if (showData.Id == null) return@let Pair(null, null)
|
||||
Pair(
|
||||
it.sub.map { eps ->
|
||||
Episode(
|
||||
AnichiLoadData(showData.Id, "sub", eps).toJson(), eps
|
||||
)
|
||||
}.reversed(),
|
||||
it.dub.map { eps ->
|
||||
Episode(
|
||||
AnichiLoadData(showData.Id, "dub", eps).toJson(), eps
|
||||
)
|
||||
}.reversed()
|
||||
it.getEpisode("sub", showData.Id),
|
||||
it.getEpisode("dub", showData.Id),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -315,6 +307,19 @@ class Anichi : MainAPI() {
|
|||
return false
|
||||
}
|
||||
|
||||
private fun AvailableEpisodesDetail.getEpisode(
|
||||
lang: String,
|
||||
id: String
|
||||
): List<com.lagradost.cloudstream3.Episode> {
|
||||
val meta = if (lang == "sub") this.sub else this.dub
|
||||
return meta.map { eps ->
|
||||
Episode(
|
||||
AnichiLoadData(id, lang, eps).toJson(),
|
||||
"Ep $eps"
|
||||
)
|
||||
}.reversed()
|
||||
}
|
||||
|
||||
private suspend fun getM3u8Qualities(
|
||||
m3u8Link: String,
|
||||
referer: String,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue