Fix description and poster in recommendations
Fix description and poster in recommendations
This commit is contained in:
parent
e9f40bc0ce
commit
bbac931833
|
@ -89,16 +89,25 @@ 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) {
|
||||||
val docEpisodes = app.get(link).document
|
val docEpisodes = app.get(link).document
|
||||||
|
@ -222,4 +231,4 @@ class PhimmoichillProvider : MainAPI() {
|
||||||
@JsonProperty("2048p") val main: DataM3u?,
|
@JsonProperty("2048p") val main: DataM3u?,
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue