mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
[Sora] Updated Home and small fix in UHDMovies
This commit is contained in:
parent
a43e1f68d5
commit
26832004a3
4 changed files with 6 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 43
|
||||
version = 44
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -1223,7 +1223,7 @@ object SoraExtractor : SoraStream() {
|
|||
|
||||
val iframe =
|
||||
detailDoc.select("div.entry-content p").map { it }
|
||||
.filter { it.text().filterIframe(season, year) }
|
||||
.filter { it.text().filterIframe(season, lastSeason, year) }
|
||||
.mapNotNull {
|
||||
if (season == null) {
|
||||
it.text() to it.nextElementSibling()?.select("a")?.attr("href")
|
||||
|
@ -1264,7 +1264,7 @@ object SoraExtractor : SoraStream() {
|
|||
val videoQuality =
|
||||
Regex("(\\d{3,4})p").find(quality)?.groupValues?.getOrNull(1)?.toIntOrNull()
|
||||
?: Qualities.Unknown.value
|
||||
val size = Regex("(?i)\\[(\\S+\\s?gb|mb)[]/]").find(quality)?.groupValues?.getOrNull(1)
|
||||
val size = Regex("(?i)\\[(\\S+\\s?(gb|mb))[]/]").find(quality)?.groupValues?.getOrNull(1)
|
||||
?.let { "[$it]" } ?: quality
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
|
|
|
@ -97,6 +97,7 @@ open class SoraStream : TmdbProvider() {
|
|||
}
|
||||
|
||||
override val mainPage = mainPageOf(
|
||||
"$tmdbAPI/trending/all/day?api_key=$apiKey®ion=&page=" to "Trending",
|
||||
"$tmdbAPI/tv/airing_today?api_key=$apiKey®ion=&page=" to "Airing Today TV Shows",
|
||||
"$tmdbAPI/movie/popular?api_key=$apiKey®ion=&page=" to "Popular Movies",
|
||||
"$tmdbAPI/tv/popular?api_key=$apiKey®ion=&page=" to "Popular TV Shows",
|
||||
|
|
|
@ -18,9 +18,9 @@ data class FilmxyCookies(
|
|||
val wSec: String? = null,
|
||||
)
|
||||
|
||||
fun String.filterIframe(seasonNum: Int?, year: Int?): Boolean {
|
||||
fun String.filterIframe(seasonNum: Int?, lastSeason: Int?, year: Int?): Boolean {
|
||||
return if (seasonNum != null) {
|
||||
if (seasonNum == 1) {
|
||||
if (lastSeason == 1) {
|
||||
this.contains(Regex("(?i)(S0?$seasonNum)|(Season\\s0?$seasonNum)|([0-9]{3,4}p)")) && !this.contains(
|
||||
"Download",
|
||||
true
|
||||
|
|
Loading…
Reference in a new issue