mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
Hdfilmcehennemi: fix detail poster
This commit is contained in:
parent
1e272a0893
commit
e4c40e4064
2 changed files with 19 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 9
|
||||
version = 10
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -83,7 +83,7 @@ class Hdfilmcehennemi : MainAPI() {
|
|||
val title = document.selectFirst("div.card-header > h1, div.card-header > h2")?.text()
|
||||
?.removeSuffix("Filminin Bilgileri")?.trim()
|
||||
?: return null
|
||||
val poster = fixUrlNull(document.selectFirst("img.img-fluid")?.attr("src"))
|
||||
val poster = fixUrlNull(document.select("img.img-fluid").lastOrNull()?.attr("src"))
|
||||
val tags = document.select("div.mb-0.lh-lg div:nth-child(5) a").map { it.text() }
|
||||
val year =
|
||||
document.selectFirst("div.mb-0.lh-lg div:nth-child(4) a")?.text()?.trim()?.toIntOrNull()
|
||||
|
@ -154,10 +154,6 @@ class Hdfilmcehennemi : MainAPI() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun String.addMarks(str: String): String {
|
||||
return this.replace(Regex("\"?$str\"?"), "\"$str\"")
|
||||
}
|
||||
|
||||
private suspend fun invokeLocalSource(
|
||||
source: String,
|
||||
url: String,
|
||||
|
@ -205,11 +201,24 @@ class Hdfilmcehennemi : MainAPI() {
|
|||
}.apmap { (url, source) ->
|
||||
safeApiCall {
|
||||
app.get(url).document.select("div.card-video > iframe").attr("data-src")
|
||||
.let { link ->
|
||||
if (link.startsWith(mainUrl)) {
|
||||
invokeLocalSource(source, link, subtitleCallback, callback)
|
||||
.let { url ->
|
||||
if (url.startsWith(mainUrl)) {
|
||||
invokeLocalSource(source, url, subtitleCallback, callback)
|
||||
} else {
|
||||
loadExtractor(link, "$mainUrl/", subtitleCallback, callback)
|
||||
loadExtractor(url, "$mainUrl/", subtitleCallback) { link ->
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
source,
|
||||
source,
|
||||
link.url,
|
||||
link.referer,
|
||||
link.quality,
|
||||
link.isM3u8,
|
||||
link.headers,
|
||||
link.extractorData
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -217,10 +226,6 @@ class Hdfilmcehennemi : MainAPI() {
|
|||
return true
|
||||
}
|
||||
|
||||
private data class Source(
|
||||
@JsonProperty("file") val file: String? = null,
|
||||
)
|
||||
|
||||
private data class SubSource(
|
||||
@JsonProperty("file") val file: String? = null,
|
||||
@JsonProperty("label") val label: String? = null,
|
||||
|
|
Loading…
Reference in a new issue