mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Fix description and poster in recommendations
Fix description and poster in recommendations
This commit is contained in:
parent
e9f40bc0ce
commit
bbac931833
1 changed files with 14 additions and 5 deletions
|
@ -89,15 +89,24 @@ class PhimmoichillProvider : MainAPI() {
|
||||||
.toIntOrNull()
|
.toIntOrNull()
|
||||||
val tvType = if (document.select("div.latest-episode").isNotEmpty()
|
val tvType = if (document.select("div.latest-episode").isNotEmpty()
|
||||||
) TvType.TvSeries else TvType.Movie
|
) TvType.TvSeries else TvType.Movie
|
||||||
val description = document.select("div#film-content-wrapper").text().trim()
|
val description = document.select("div#film-content").text().trim()
|
||||||
val trailer =
|
val trailer =
|
||||||
document.select("div#trailer script").last()?.data()?.substringAfter("file: \"")
|
document.select("div#trailer script").last()?.data()?.substringAfter("file: \"")
|
||||||
?.substringBefore("\",")
|
?.substringBefore("\",")
|
||||||
val rating =
|
val rating =
|
||||||
document.select("ul.entry-meta.block-film li:nth-child(7) span").text().toRatingInt()
|
document.select("ul.entry-meta.block-film li:nth-child(7) span").text().toRatingInt()
|
||||||
val actors = document.select("ul.entry-meta.block-film li:last-child a").map { it.text() }
|
val actors = document.select("ul.entry-meta.block-film li:last-child a").map { it.text() }
|
||||||
val recommendations = document.select("ul#list-film-realted li.item").map {
|
val recommendations = document.select("ul#list-film-realted li.item").mapNotNull {
|
||||||
it.toSearchResult()
|
val titleHeader = element.select("li.item > p") ?: return null
|
||||||
|
val recUrl = fixUrlNull(titleHeader.attr("href")) ?: return null
|
||||||
|
val recTitle = titleHeader.text() ?: return null
|
||||||
|
val poster = element.select("li.item > .lazyloaded > img").attr("src")
|
||||||
|
MovieSearchResponse(
|
||||||
|
recTitle,
|
||||||
|
recUrl,
|
||||||
|
this.name,
|
||||||
|
poster
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return if (tvType == TvType.TvSeries) {
|
return if (tvType == TvType.TvSeries) {
|
||||||
|
|
Loading…
Reference in a new issue