Merge remote-tracking branch 'origin/master'

This commit is contained in:
LagradOst 2022-06-17 19:25:54 +02:00
commit 09f4831e4b
3 changed files with 21 additions and 17 deletions

View file

@ -5,6 +5,8 @@ import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
class AltadefinizioneProvider : MainAPI() { class AltadefinizioneProvider : MainAPI() {
override var lang = "it" override var lang = "it"
@ -111,6 +113,9 @@ class AltadefinizioneProvider : MainAPI() {
} }
val tags: List<String> = document.select("#details > li:nth-child(1) > a").map { it.text() } val tags: List<String> = document.select("#details > li:nth-child(1) > a").map { it.text() }
val trailerurl = document.selectFirst("#showtrailer > div > div > iframe")!!.attr("src")
return newMovieLoadResponse( return newMovieLoadResponse(
title, title,
url, url,
@ -125,6 +130,7 @@ class AltadefinizioneProvider : MainAPI() {
this.duration = null this.duration = null
this.actors = actors this.actors = actors
this.tags = tags this.tags = tags
addTrailer(trailerurl)
} }
} }

View file

@ -284,7 +284,7 @@ class StreamingcommunityProvider : MainAPI() {
val trailerinfojs = document.select("slider-trailer").attr("videos") val trailerinfojs = document.select("slider-trailer").attr("videos")
val trailerinfo = parseJson<List<TrailerElement>>(trailerinfojs) val trailerinfo = parseJson<List<TrailerElement>>(trailerinfojs)
val trailerurl: String? = if (trailerinfo.isNotEmpty()) { val trailerurl: String? = if (trailerinfo.isNotEmpty()) {
"https://www.youtube.com/watch?v=${trailerinfo[0].id}" "https://www.youtube.com/watch?v=${trailerinfo[0].url}"
} else { } else {
null null
} }

View file

@ -4,6 +4,8 @@ import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.mvvm.logError import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
class TantifilmProvider : MainAPI() { class TantifilmProvider : MainAPI() {
override var lang = "it" override var lang = "it"
@ -69,7 +71,6 @@ class TantifilmProvider : MainAPI() {
} }
} }
override suspend fun load(url: String): LoadResponse { override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document val document = app.get(url).document
val type = if (document.selectFirst("div.category-film")!!.text().contains("Serie") val type = if (document.selectFirst("div.category-film")!!.text().contains("Serie")
@ -107,7 +108,7 @@ class TantifilmProvider : MainAPI() {
} }
val trailerurl = document.selectFirst("#trailer_mob > iframe")!!.attr("src")
if (type == TvType.TvSeries) { if (type == TvType.TvSeries) {
val list = ArrayList<Pair<Int, String>>() val list = ArrayList<Pair<Int, String>>()
@ -142,22 +143,18 @@ class TantifilmProvider : MainAPI() {
} }
} }
} }
return TvSeriesLoadResponse( return newTvSeriesLoadResponse(
title, title,
url, url,
this.name,
type, type,
episodeList, episodeList) {
fixUrlNull(poster), this.posterUrl= fixUrlNull(poster)
year.toIntOrNull(), this.year = year.toIntOrNull()
descipt[0], this.plot= descipt[0]
null, this.rating= rating
rating, this.recommendations = recomm
null, addTrailer(trailerurl)
null, }
null,
recomm
)
} else { } else {
val url2 = document.selectFirst("iframe")!!.attr("src") val url2 = document.selectFirst("iframe")!!.attr("src")
val actorpagelink = val actorpagelink =
@ -217,6 +214,7 @@ class TantifilmProvider : MainAPI() {
this.tags = tags this.tags = tags
this.duration = duratio this.duration = duratio
this.actors = actors this.actors = actors
addTrailer(trailerurl)
} }
} }