mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Other Fixes
This commit is contained in:
parent
44664a60d2
commit
c50d20330a
1 changed files with 4 additions and 17 deletions
|
@ -62,13 +62,7 @@ class CasaCinemaProvider : MainAPI() { // all providers must be an instance of M
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun Element.toSearchResult(): SearchResponse {
|
private fun Element.toSearchResult(): SearchResponse {
|
||||||
val title =
|
val title = fixTitle(this.selectFirst(".title"))
|
||||||
this.selectFirst(".title")
|
|
||||||
?.text()
|
|
||||||
?.trim()
|
|
||||||
?.replace("[HD]", "")
|
|
||||||
?.replace("\\(\\d{4}\\)".toRegex(), "")
|
|
||||||
?: "No title"
|
|
||||||
val isMovie = this.selectFirst(".title").isMovie()
|
val isMovie = this.selectFirst(".title").isMovie()
|
||||||
val link =
|
val link =
|
||||||
this.selectFirst("a")?.attr("href") ?: throw ErrorLoadingException("No Link found")
|
this.selectFirst("a")?.attr("href") ?: throw ErrorLoadingException("No Link found")
|
||||||
|
@ -94,8 +88,7 @@ class CasaCinemaProvider : MainAPI() { // all providers must be an instance of M
|
||||||
val type =
|
val type =
|
||||||
if (document.select("div.seasons-wraper").isNotEmpty()) TvType.TvSeries
|
if (document.select("div.seasons-wraper").isNotEmpty()) TvType.TvSeries
|
||||||
else TvType.Movie
|
else TvType.Movie
|
||||||
val title =
|
val title = fixTitle(document.selectFirst("div.row > h1"))
|
||||||
fixTitle(document.selectFirst("div.row > h1"))
|
|
||||||
val description = document.select("div.element").last()?.text()
|
val description = document.select("div.element").last()?.text()
|
||||||
val year = document.selectFirst("div.element>a.tag")
|
val year = document.selectFirst("div.element>a.tag")
|
||||||
?.text()
|
?.text()
|
||||||
|
@ -149,14 +142,8 @@ class CasaCinemaProvider : MainAPI() { // all providers must be an instance of M
|
||||||
|
|
||||||
private fun Element.toRecommendResult(): SearchResponse {
|
private fun Element.toRecommendResult(): SearchResponse {
|
||||||
val title =
|
val title =
|
||||||
this.selectFirst("span.crp_title")
|
fixTitle(this.selectFirst("span.crp_title"))
|
||||||
?.text()
|
val isMovie = this.selectFirst("span.crp_title").isMovie()
|
||||||
?.trim()
|
|
||||||
?.replace("[HD]", "")
|
|
||||||
?.replace("\\(\\d{4}\\)".toRegex(), "")
|
|
||||||
?: "No title"
|
|
||||||
val isMovie =
|
|
||||||
(this.selectFirst("span.crp_title")?.text() ?: "").contains("\\(\\d{4}\\)".toRegex())
|
|
||||||
val link =
|
val link =
|
||||||
this.selectFirst("a")?.attr("href") ?: throw ErrorLoadingException("No Link found")
|
this.selectFirst("a")?.attr("href") ?: throw ErrorLoadingException("No Link found")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue