fixed wrong order episode in soraVIP

This commit is contained in:
hexated 2022-10-21 15:02:38 +07:00
parent 77b2945021
commit da3960bf42
3 changed files with 11 additions and 12 deletions

View file

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

View file

@ -1,6 +1,5 @@
package com.hexated
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.network.WebViewResolver
import com.lagradost.cloudstream3.utils.*
@ -294,7 +293,7 @@ object SoraExtractor : SoraStream() {
val query = if (season == null) {
"$mainServerAPI/movies/$id/watch?provider=Loklok&id=$providerId&_data=routes/movies/\$movieId.watch"
} else {
"$mainServerAPI/tv-shows/$id/season/$season/episode/$episode?provider=Loklok&id=$providerId&_data=routes/tv-shows/\$tvId.season.\$seasonId.episode.\$episodeId"
"$mainServerAPI/tv-shows/$id/season/$season/episode/${episode?.minus(1)}?provider=Loklok&id=$providerId&_data=routes/tv-shows/\$tvId.season.\$seasonId.episode.\$episodeId"
}
val json = app.get(
@ -425,12 +424,3 @@ suspend fun loadLinksWithWebView(
)
}
private data class MovieHabData(
@JsonProperty("link") val link: String? = null,
@JsonProperty("token") val token: String? = null,
)
private data class MovieHabRes(
@JsonProperty("data") val data: MovieHabData? = null,
)

View file

@ -542,4 +542,13 @@ open class SoraStream : TmdbProvider() {
@JsonProperty("provider") val provider: ArrayList<Providers>? = arrayListOf(),
)
data class MovieHabData(
@JsonProperty("link") val link: String? = null,
@JsonProperty("token") val token: String? = null,
)
data class MovieHabRes(
@JsonProperty("data") val data: MovieHabData? = null,
)
}