mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
Anichi: fix missing episode
This commit is contained in:
parent
09c59d211a
commit
4bf526dc36
2 changed files with 15 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
||||||
import org.jetbrains.kotlin.konan.properties.Properties
|
import org.jetbrains.kotlin.konan.properties.Properties
|
||||||
|
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -143,19 +143,21 @@ class Anichi : MainAPI() {
|
||||||
val poster = showData.thumbnail
|
val poster = showData.thumbnail
|
||||||
val type = getType(showData.type ?: "")
|
val type = getType(showData.type ?: "")
|
||||||
|
|
||||||
val episodes = showData.availableEpisodes.let {
|
val episodes = showData.availableEpisodesDetail.let {
|
||||||
if (it == null) return@let Pair(null, null)
|
if (it == null) return@let Pair(null, null)
|
||||||
if (showData.Id == null) return@let Pair(null, null)
|
if (showData.Id == null) return@let Pair(null, null)
|
||||||
|
Pair(
|
||||||
Pair(if (it.sub != 0) ((1..it.sub).map { epNum ->
|
it.sub.map { eps ->
|
||||||
Episode(
|
Episode(
|
||||||
AnichiLoadData(showData.Id, "sub", epNum).toJson(), episode = epNum
|
AnichiLoadData(showData.Id, "sub", eps).toJson(), eps
|
||||||
)
|
)
|
||||||
}) else null, if (it.dub != 0) ((1..it.dub).map { epNum ->
|
}.reversed(),
|
||||||
Episode(
|
it.dub.map { eps ->
|
||||||
AnichiLoadData(showData.Id, "dub", epNum).toJson(), episode = epNum
|
Episode(
|
||||||
)
|
AnichiLoadData(showData.Id, "dub", eps).toJson(), eps
|
||||||
}) else null)
|
)
|
||||||
|
}.reversed()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
val characters = showData.characters?.map {
|
val characters = showData.characters?.map {
|
||||||
|
@ -396,7 +398,7 @@ class Anichi : MainAPI() {
|
||||||
data class AnichiLoadData(
|
data class AnichiLoadData(
|
||||||
val hash: String,
|
val hash: String,
|
||||||
val dubStatus: String,
|
val dubStatus: String,
|
||||||
val episode: Int
|
val episode: String
|
||||||
)
|
)
|
||||||
|
|
||||||
data class AkIframe(
|
data class AkIframe(
|
||||||
|
|
Loading…
Reference in a new issue