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
|
// use an integer for version numbers
|
||||||
version = 9
|
version = 10
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -83,7 +83,7 @@ class Hdfilmcehennemi : MainAPI() {
|
||||||
val title = document.selectFirst("div.card-header > h1, div.card-header > h2")?.text()
|
val title = document.selectFirst("div.card-header > h1, div.card-header > h2")?.text()
|
||||||
?.removeSuffix("Filminin Bilgileri")?.trim()
|
?.removeSuffix("Filminin Bilgileri")?.trim()
|
||||||
?: return null
|
?: 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 tags = document.select("div.mb-0.lh-lg div:nth-child(5) a").map { it.text() }
|
||||||
val year =
|
val year =
|
||||||
document.selectFirst("div.mb-0.lh-lg div:nth-child(4) a")?.text()?.trim()?.toIntOrNull()
|
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(
|
private suspend fun invokeLocalSource(
|
||||||
source: String,
|
source: String,
|
||||||
url: String,
|
url: String,
|
||||||
|
@ -205,11 +201,24 @@ class Hdfilmcehennemi : MainAPI() {
|
||||||
}.apmap { (url, source) ->
|
}.apmap { (url, source) ->
|
||||||
safeApiCall {
|
safeApiCall {
|
||||||
app.get(url).document.select("div.card-video > iframe").attr("data-src")
|
app.get(url).document.select("div.card-video > iframe").attr("data-src")
|
||||||
.let { link ->
|
.let { url ->
|
||||||
if (link.startsWith(mainUrl)) {
|
if (url.startsWith(mainUrl)) {
|
||||||
invokeLocalSource(source, link, subtitleCallback, callback)
|
invokeLocalSource(source, url, subtitleCallback, callback)
|
||||||
} else {
|
} 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
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
private data class Source(
|
|
||||||
@JsonProperty("file") val file: String? = null,
|
|
||||||
)
|
|
||||||
|
|
||||||
private data class SubSource(
|
private data class SubSource(
|
||||||
@JsonProperty("file") val file: String? = null,
|
@JsonProperty("file") val file: String? = null,
|
||||||
@JsonProperty("label") val label: String? = null,
|
@JsonProperty("label") val label: String? = null,
|
||||||
|
|
Loading…
Reference in a new issue