mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
Nodrakorid & Hdmovie2: fix episodes list
This commit is contained in:
parent
b04f604e74
commit
5341a03eb6
7 changed files with 20 additions and 25 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 4
|
||||
version = 5
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -46,7 +46,9 @@ open class Gomov : MainAPI() {
|
|||
val posterUrl = fixUrlNull(this.selectFirst("a > img")?.attr("src"))?.fixImageQuality()
|
||||
val quality = this.select("div.gmr-qual, div.gmr-quality-item > a").text().trim().replace("-", "")
|
||||
return if (quality.isEmpty()) {
|
||||
val episode = this.select("div.gmr-numbeps > span").text().toIntOrNull()
|
||||
val episode =
|
||||
Regex("Episode\\s?([0-9]+)").find(title)?.groupValues?.getOrNull(1)?.toIntOrNull()
|
||||
?: this.select("div.gmr-numbeps > span").text().toIntOrNull()
|
||||
newAnimeSearchResponse(title, href, TvType.TvSeries) {
|
||||
this.posterUrl = posterUrl
|
||||
addSub(episode)
|
||||
|
|
|
@ -35,7 +35,7 @@ class Nodrakorid : DutaMovie() {
|
|||
ele.ownText().filter { it.isDigit() }.toIntOrNull() to ele.select("a")
|
||||
.map { it.attr("href") to it.text() }
|
||||
}.filter { it.first != null }
|
||||
Episode(siblings.toJson(), episode = num.filter { it.isDigit() }.toIntOrNull())
|
||||
Episode(siblings.toJson(), episode = Regex("Episode\\s?([0-9]+)").find(num)?.groupValues?.getOrNull(1)?.toIntOrNull())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 38
|
||||
version = 39
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -118,10 +118,10 @@ open class Movierulzhd : MainAPI() {
|
|||
document.select("span.date").text().trim()
|
||||
)?.groupValues?.get(1).toString().toIntOrNull()
|
||||
val tvType = if (document.select("ul#section > li:nth-child(1)").text()
|
||||
.contains("Episodes") || document.selectFirst("ul#playeroptionsul li span.title")
|
||||
?.text()?.contains(
|
||||
.contains("Episodes") || document.select("ul#playeroptionsul li span.title")
|
||||
.text().contains(
|
||||
Regex("Episode\\s+\\d+|EP\\d+|PE\\d+")
|
||||
) == true
|
||||
)
|
||||
) TvType.TvSeries else TvType.Movie
|
||||
val description = document.select("div.wp-content > p").text().trim()
|
||||
val trailer = document.selectFirst("div.embed iframe")?.attr("src")
|
||||
|
|
|
@ -332,21 +332,14 @@ object SoraExtractor : SoraStream() {
|
|||
}
|
||||
|
||||
val iframe = app.get(url).document.selectFirst("iframe.Moly")?.attr("data-src")
|
||||
loadExtractor(iframe ?: return, "$dreamfilmAPI/", subtitleCallback) { link ->
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
link.name,
|
||||
link.name,
|
||||
link.url,
|
||||
link.referer,
|
||||
Qualities.P1080.value,
|
||||
link.isM3u8,
|
||||
link.headers,
|
||||
link.extractorData
|
||||
loadCustomExtractor(
|
||||
null,
|
||||
iframe ?: return,
|
||||
"$dreamfilmAPI/",
|
||||
subtitleCallback,
|
||||
callback,
|
||||
Qualities.P1080.value
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
suspend fun invokeSeries9(
|
||||
|
|
|
@ -1154,7 +1154,7 @@ suspend fun tmdbToAnimeId(title: String?, year: Int?, season: String?, type: TvT
|
|||
}
|
||||
|
||||
suspend fun loadCustomExtractor(
|
||||
name: String,
|
||||
name: String? = null,
|
||||
url: String,
|
||||
referer: String? = null,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
|
@ -1164,8 +1164,8 @@ suspend fun loadCustomExtractor(
|
|||
loadExtractor(url, referer, subtitleCallback) { link ->
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
name,
|
||||
name,
|
||||
name ?: link.source,
|
||||
name ?: link.name,
|
||||
link.url,
|
||||
link.referer,
|
||||
when {
|
||||
|
|
Loading…
Reference in a new issue