eneyida: Added banner for backgroundImage

This commit is contained in:
CakesTwix 2024-08-17 21:12:25 +03:00
parent 895dfb7d5f
commit 9948b26d60
Signed by: CakesTwix
GPG key ID: 7B11051D5CE19825
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 6 version = 7
cloudstream { cloudstream {

View file

@ -77,6 +77,7 @@ class EneyidaProvider : MainAPI() {
val fullInfo = document.select(".full_info li") val fullInfo = document.select(".full_info li")
val title = document.selectFirst("div.full_header-title h1")?.text()?.trim().toString() val title = document.selectFirst("div.full_header-title h1")?.text()?.trim().toString()
val poster = mainUrl + document.selectFirst(".full_content-poster img")?.attr("src") val poster = mainUrl + document.selectFirst(".full_content-poster img")?.attr("src")
val banner = document.select(".full_header__bg-img").attr("style").substringAfterLast("url(").substringBefore(");")
val tags = fullInfo[1].select("a").map { it.text() } val tags = fullInfo[1].select("a").map { it.text() }
val year = fullInfo[0].select("a").text().toIntOrNull() val year = fullInfo[0].select("a").text().toIntOrNull()
val playerUrl = document.select(".tabs_b.visible iframe").attr("src") val playerUrl = document.select(".tabs_b.visible iframe").attr("src")
@ -116,6 +117,7 @@ class EneyidaProvider : MainAPI() {
} }
newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) { newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) {
this.posterUrl = poster this.posterUrl = poster
this.backgroundPosterUrl = banner
this.year = year this.year = year
this.plot = description this.plot = description
this.tags = tags this.tags = tags
@ -127,6 +129,7 @@ class EneyidaProvider : MainAPI() {
} else { // Parse as Movie. } else { // Parse as Movie.
newMovieLoadResponse(title, url, TvType.Movie, "$title, $playerUrl") { newMovieLoadResponse(title, url, TvType.Movie, "$title, $playerUrl") {
this.posterUrl = poster this.posterUrl = poster
this.backgroundPosterUrl = banner
this.year = year this.year = year
this.plot = description this.plot = description
this.tags = tags this.tags = tags