From 7c1254cb747db7884546d53b59ac28f7bce8c9b5 Mon Sep 17 00:00:00 2001 From: hexated Date: Thu, 24 Nov 2022 13:27:52 +0700 Subject: [PATCH] disabled UHDMovies --- .../main/kotlin/com/hexated/SoraExtractor.kt | 6 ++--- .../src/main/kotlin/com/hexated/SoraStream.kt | 26 +++++++++++-------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 706f427f..44c73520 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -957,7 +957,7 @@ object SoraExtractor : SoraStream() { ).apmap { server -> delay(1000) val sources = - app.get("$consumetFlixhqAPI/watch?episodeId=$episodeId&mediaId=$id&server=$server") + app.get("$consumetFlixhqAPI/watch?episodeId=$episodeId&mediaId=$id&server=$server", timeout = 120L) .parsedSafe() val name = fixTitle(server) sources?.sources?.map { @@ -1095,7 +1095,7 @@ object SoraExtractor : SoraStream() { }?.id ?: return delay(1000) - val sources = app.get("$consumetZoroAPI/watch?episodeId=$episodeId") + val sources = app.get("$consumetZoroAPI/watch?episodeId=$episodeId", timeout = 120L) .parsedSafe() ?: return sources.sources?.map { @@ -1315,7 +1315,7 @@ data class FilmxyCookies( fun String.filterIframe(seasonNum: Int?, year: Int?): Boolean { return if (seasonNum != null) { - this.contains(Regex("(?i)(S0?$seasonNum)")) && !this.contains("Download", true) + this.contains(Regex("(?i)(S0?$seasonNum)|(Season\\s0?$seasonNum)")) && !this.contains("Download", true) } else { this.contains("$year", true) && !this.contains("Download", true) } diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 2bad93cb..b58d28b6 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -172,6 +172,7 @@ open class SoraStream : TmdbProvider() { val poster = getOriImageUrl(res.backdropPath) val orgTitle = res.originalTitle ?: res.originalName ?: return null val year = (res.releaseDate ?: res.firstAirDate)?.split("-")?.first()?.toIntOrNull() + val rating = res.vote_average.toString().toRatingInt() val genres = res.genres?.mapNotNull { it.name } val show = if (genres?.contains("Animation") == true && res.original_language == "ja") "Anime" else "Series/Movies" @@ -230,6 +231,7 @@ open class SoraStream : TmdbProvider() { this.year = year this.plot = res.overview this.tags = genres + this.rating = rating this.showStatus = getStatus(res.status) this.recommendations = recommendations this.actors = actors @@ -254,6 +256,7 @@ open class SoraStream : TmdbProvider() { this.year = year this.plot = res.overview this.tags = genres + this.rating = rating this.recommendations = recommendations this.actors = actors addTrailer(trailer) @@ -431,17 +434,17 @@ open class SoraStream : TmdbProvider() { callback ) }, - { - invokeUhdmovies( - res.title, - res.year, - res.season, - res.lastSeason, - res.episode, - subtitleCallback, - callback - ) - }, +// { +// invokeUhdmovies( +// res.title, +// res.year, +// res.season, +// res.lastSeason, +// res.episode, +// subtitleCallback, +// callback +// ) +// }, { invokeFwatayako(res.imdbId, res.season, res.episode, subtitleCallback, callback) }, @@ -572,6 +575,7 @@ open class SoraStream : TmdbProvider() { @JsonProperty("release_date") val releaseDate: String? = null, @JsonProperty("first_air_date") val firstAirDate: String? = null, @JsonProperty("overview") val overview: String? = null, + @JsonProperty("vote_average") val vote_average: Any? = null, @JsonProperty("original_language") val original_language: String? = null, @JsonProperty("status") val status: String? = null, @JsonProperty("genres") val genres: ArrayList? = arrayListOf(),