AnimeDekhoProvider, Raveeflix: fix when bookmarking.

This commit is contained in:
Olivia 2024-02-09 15:29:50 +07:00
parent 1fd3422832
commit 6cce88370a
4 changed files with 10 additions and 8 deletions

View File

@ -1,4 +1,4 @@
version = 3 version = 4
cloudstream { cloudstream {
language = "hi" language = "hi"

View File

@ -49,8 +49,9 @@ class AnimeDekhoProvider : MainAPI() {
val title = this.selectFirst("header h2")?.text() ?: "null" val title = this.selectFirst("header h2")?.text() ?: "null"
val posterUrl = this.selectFirst("div figure img")?.attr("src") val posterUrl = this.selectFirst("div figure img")?.attr("src")
return newAnimeSearchResponse(title, Media(href, posterUrl).toJson(), TvType.Anime) { return newAnimeSearchResponse(title, Media(href, posterUrl).toJson(), TvType.Anime, false) {
this.posterUrl = posterUrl this.posterUrl = posterUrl
addDubStatus(dubExist = true, subExist = true)
} }
} }
@ -77,7 +78,7 @@ class AnimeDekhoProvider : MainAPI() {
val lst = document.select("ul.seasons-lst li") val lst = document.select("ul.seasons-lst li")
return if (lst.isEmpty()) { return if (lst.isEmpty()) {
newMovieLoadResponse(title, media.url, TvType.Movie, Media(media.url, mediaType = 1).toJson()) { newMovieLoadResponse(title, url, TvType.Movie, Media(media.url, mediaType = 1).toJson()) {
this.posterUrl = poster this.posterUrl = poster
this.plot = plot this.plot = plot
this.year = year this.year = year
@ -88,7 +89,7 @@ class AnimeDekhoProvider : MainAPI() {
val href = it.selectFirst("a")?.attr("href") ?: return@mapNotNull null val href = it.selectFirst("a")?.attr("href") ?: return@mapNotNull null
Episode(Media(href, mediaType = 2).toJson(), name) Episode(Media(href, mediaType = 2).toJson(), name)
} }
newTvSeriesLoadResponse(title, media.url, TvType.TvSeries, episodes) { newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes) {
this.posterUrl = poster this.posterUrl = poster
this.plot = plot this.plot = plot
this.year = year this.year = year

View File

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

View File

@ -49,7 +49,7 @@ class Raveeflix : MainAPI() {
val href = fixUrl(this.attr("href")) val href = fixUrl(this.attr("href"))
val posterUrl = this.selectFirst("div.thumbnail_card")?.attr("style")?.getPoster() val posterUrl = this.selectFirst("div.thumbnail_card")?.attr("style")?.getPoster()
return newMovieSearchResponse(title, Media(href, posterUrl).toJson(), TvType.Movie) { return newMovieSearchResponse(title, Media(href, posterUrl).toJson(), TvType.Movie, false) {
this.posterUrl = posterUrl this.posterUrl = posterUrl
} }
} }
@ -75,6 +75,7 @@ class Raveeflix : MainAPI() {
) )
).toJson(), ).toJson(),
TvType.Movie, TvType.Movie,
false,
) )
} }
} }
@ -131,7 +132,7 @@ class Raveeflix : MainAPI() {
} else { } else {
fetchEpisodesFromPages(media.url, 5, sectionSelector, false) fetchEpisodesFromPages(media.url, 5, sectionSelector, false)
} }
newTvSeriesLoadResponse(title, media.url, TvType.TvSeries, episodes.reversed()) { newTvSeriesLoadResponse(title, url, TvType.TvSeries, episodes.reversed()) {
this.posterUrl = poster this.posterUrl = poster
this.year = year this.year = year
this.seasonNames this.seasonNames
@ -142,7 +143,7 @@ class Raveeflix : MainAPI() {
this.recommendations = recommendations this.recommendations = recommendations
} }
} else { } else {
newMovieLoadResponse(title, media.url, TvType.Movie, media.url) { newMovieLoadResponse(title, url, TvType.Movie, media.url) {
this.posterUrl = poster this.posterUrl = poster
this.year = year this.year = year
this.plot = description this.plot = description