mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed Jenius
This commit is contained in:
parent
e65246dea0
commit
f6c67f27c8
2 changed files with 14 additions and 9 deletions
|
@ -490,6 +490,7 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
suspend fun invokeIdlix(
|
suspend fun invokeIdlix(
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
|
year: Int? = null,
|
||||||
season: Int? = null,
|
season: Int? = null,
|
||||||
episode: Int? = null,
|
episode: Int? = null,
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
@ -497,7 +498,7 @@ object SoraExtractor : SoraStream() {
|
||||||
) {
|
) {
|
||||||
val fixTitle = title.fixTitle()
|
val fixTitle = title.fixTitle()
|
||||||
val url = if (season == null) {
|
val url = if (season == null) {
|
||||||
"$idlixAPI/movie/$fixTitle"
|
"$idlixAPI/movie/$fixTitle-$year"
|
||||||
} else {
|
} else {
|
||||||
"$idlixAPI/episode/$fixTitle-season-$season-episode-$episode"
|
"$idlixAPI/episode/$fixTitle-season-$season-episode-$episode"
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,6 +201,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
?: throw ErrorLoadingException("Invalid Json Response")
|
?: throw ErrorLoadingException("Invalid Json Response")
|
||||||
val res = responses.result ?: return null
|
val res = responses.result ?: return null
|
||||||
val title = res.title ?: res.name ?: res.originalTitle ?: res.originalName ?: return null
|
val title = res.title ?: res.name ?: res.originalTitle ?: res.originalName ?: return null
|
||||||
|
val year = (res.releaseDate ?: res.firstAirDate)?.split("-")?.first()?.toIntOrNull()
|
||||||
val type = getType(data.type)
|
val type = getType(data.type)
|
||||||
val actors = responses.cast?.mapNotNull { cast ->
|
val actors = responses.cast?.mapNotNull { cast ->
|
||||||
ActorData(
|
ActorData(
|
||||||
|
@ -214,7 +215,9 @@ open class SoraStream : TmdbProvider() {
|
||||||
val recommendations =
|
val recommendations =
|
||||||
responses.recommandations?.mapNotNull { media -> media.toSearchResponse() }
|
responses.recommandations?.mapNotNull { media -> media.toSearchResponse() }
|
||||||
|
|
||||||
val trailer = responses.result.videos?.results?.map { "https://www.youtube.com/watch?v=${it.key}" }?.randomOrNull()
|
val trailer =
|
||||||
|
responses.result.videos?.results?.map { "https://www.youtube.com/watch?v=${it.key}" }
|
||||||
|
?.randomOrNull()
|
||||||
|
|
||||||
return if (type == TvType.TvSeries) {
|
return if (type == TvType.TvSeries) {
|
||||||
val episodes = mutableListOf<Episode>()
|
val episodes = mutableListOf<Episode>()
|
||||||
|
@ -229,6 +232,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
eps.seasonNumber,
|
eps.seasonNumber,
|
||||||
eps.episodeNumber,
|
eps.episodeNumber,
|
||||||
title = title,
|
title = title,
|
||||||
|
year = year,
|
||||||
).toJson(),
|
).toJson(),
|
||||||
name = eps.name,
|
name = eps.name,
|
||||||
season = eps.seasonNumber,
|
season = eps.seasonNumber,
|
||||||
|
@ -248,8 +252,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
episodes
|
episodes
|
||||||
) {
|
) {
|
||||||
this.posterUrl = getImageUrl(res.posterPath)
|
this.posterUrl = getImageUrl(res.posterPath)
|
||||||
this.year =
|
this.year = year
|
||||||
(res.releaseDate ?: res.firstAirDate)?.split("-")?.first()?.toIntOrNull()
|
|
||||||
this.plot = res.overview
|
this.plot = res.overview
|
||||||
this.tags = res.genres?.mapNotNull { it.name }
|
this.tags = res.genres?.mapNotNull { it.name }
|
||||||
this.showStatus = getStatus(res.status)
|
this.showStatus = getStatus(res.status)
|
||||||
|
@ -267,11 +270,11 @@ open class SoraStream : TmdbProvider() {
|
||||||
responses.imdbId,
|
responses.imdbId,
|
||||||
data.type,
|
data.type,
|
||||||
title = title,
|
title = title,
|
||||||
|
year = year,
|
||||||
).toJson(),
|
).toJson(),
|
||||||
) {
|
) {
|
||||||
this.posterUrl = getImageUrl(res.posterPath)
|
this.posterUrl = getImageUrl(res.posterPath)
|
||||||
this.year =
|
this.year = year
|
||||||
(res.releaseDate ?: res.firstAirDate)?.split("-")?.first()?.toIntOrNull()
|
|
||||||
this.plot = res.overview
|
this.plot = res.overview
|
||||||
this.tags = res.genres?.mapNotNull { it.name }
|
this.tags = res.genres?.mapNotNull { it.name }
|
||||||
this.recommendations = recommendations
|
this.recommendations = recommendations
|
||||||
|
@ -381,7 +384,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
invokeSeries9(res.title, res.season, res.episode, subtitleCallback, callback)
|
invokeSeries9(res.title, res.season, res.episode, subtitleCallback, callback)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
invokeIdlix(res.title, res.season, res.episode, subtitleCallback, callback)
|
invokeIdlix(res.title, res.year, res.season, res.episode, subtitleCallback, callback)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
invokeNoverse(res.title, res.season, res.episode, callback)
|
invokeNoverse(res.title, res.season, res.episode, callback)
|
||||||
|
@ -400,6 +403,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
val aniId: String? = null,
|
val aniId: String? = null,
|
||||||
val animeId: String? = null,
|
val animeId: String? = null,
|
||||||
val title: String? = null,
|
val title: String? = null,
|
||||||
|
val year: Int? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Data(
|
data class Data(
|
||||||
|
@ -571,7 +575,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
@JsonProperty("detail") val detail: DetailAnime? = null,
|
@JsonProperty("detail") val detail: DetailAnime? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class seasonsVip(
|
data class SeasonsVip(
|
||||||
@JsonProperty("air_date") val air_date: String? = null,
|
@JsonProperty("air_date") val air_date: String? = null,
|
||||||
@JsonProperty("season_number") val season_number: Int? = null,
|
@JsonProperty("season_number") val season_number: Int? = null,
|
||||||
)
|
)
|
||||||
|
@ -583,7 +587,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
@JsonProperty("original_name") val original_name: String? = null,
|
@JsonProperty("original_name") val original_name: String? = null,
|
||||||
@JsonProperty("release_date") val release_date: String? = null,
|
@JsonProperty("release_date") val release_date: String? = null,
|
||||||
@JsonProperty("first_air_date") val first_air_date: String? = null,
|
@JsonProperty("first_air_date") val first_air_date: String? = null,
|
||||||
@JsonProperty("seasons") val seasons: ArrayList<seasonsVip>? = arrayListOf(),
|
@JsonProperty("seasons") val seasons: ArrayList<SeasonsVip>? = arrayListOf(),
|
||||||
)
|
)
|
||||||
|
|
||||||
data class DetailVipResult(
|
data class DetailVipResult(
|
||||||
|
|
Loading…
Reference in a new issue