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
|
// use an integer for version numbers
|
||||||
version = 43
|
version = 44
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -1223,7 +1223,7 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
val iframe =
|
val iframe =
|
||||||
detailDoc.select("div.entry-content p").map { it }
|
detailDoc.select("div.entry-content p").map { it }
|
||||||
.filter { it.text().filterIframe(season, year) }
|
.filter { it.text().filterIframe(season, lastSeason, year) }
|
||||||
.mapNotNull {
|
.mapNotNull {
|
||||||
if (season == null) {
|
if (season == null) {
|
||||||
it.text() to it.nextElementSibling()?.select("a")?.attr("href")
|
it.text() to it.nextElementSibling()?.select("a")?.attr("href")
|
||||||
|
@ -1264,7 +1264,7 @@ object SoraExtractor : SoraStream() {
|
||||||
val videoQuality =
|
val videoQuality =
|
||||||
Regex("(\\d{3,4})p").find(quality)?.groupValues?.getOrNull(1)?.toIntOrNull()
|
Regex("(\\d{3,4})p").find(quality)?.groupValues?.getOrNull(1)?.toIntOrNull()
|
||||||
?: Qualities.Unknown.value
|
?: 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
|
?.let { "[$it]" } ?: quality
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
|
|
|
@ -97,6 +97,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override val mainPage = mainPageOf(
|
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/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/movie/popular?api_key=$apiKey®ion=&page=" to "Popular Movies",
|
||||||
"$tmdbAPI/tv/popular?api_key=$apiKey®ion=&page=" to "Popular TV Shows",
|
"$tmdbAPI/tv/popular?api_key=$apiKey®ion=&page=" to "Popular TV Shows",
|
||||||
|
|
|
@ -18,9 +18,9 @@ data class FilmxyCookies(
|
||||||
val wSec: String? = null,
|
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) {
|
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(
|
this.contains(Regex("(?i)(S0?$seasonNum)|(Season\\s0?$seasonNum)|([0-9]{3,4}p)")) && !this.contains(
|
||||||
"Download",
|
"Download",
|
||||||
true
|
true
|
||||||
|
|
Loading…
Reference in a new issue