Update PhimmoichillProvider.kt (#14)

This commit is contained in:
tuan041 2022-09-04 20:26:07 +07:00 committed by GitHub
parent 2cdff514e4
commit b0905c3c68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,19 +96,9 @@ class PhimmoichillProvider : MainAPI() {
val rating =
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 recommendations = document.select("ul#list-film-realted li.item").mapNotNull {
val titleHeader = it.select("p") ?: return@mapNotNull null
val recUrl = titleHeader.attr("href") ?: return@mapNotNull null
val recTitle = titleHeader.text() ?: return@mapNotNull null
val poster = it.select("img").attr("src")
MovieSearchResponse(
recTitle,
recUrl,
this.name,
TvType.Movie,
poster
)
}
val recommendations = document.select("ul#list-film-realted li.item").map {
it.toSearchResult()
}
return if (tvType == TvType.TvSeries) {
val docEpisodes = app.get(link).document