uaserial: Add Actors
This commit is contained in:
parent
ea3abc472b
commit
9efaa4c301
2 changed files with 7 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 2
|
version = 3
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation("com.google.code.gson:gson:2.9.0")
|
implementation("com.google.code.gson:gson:2.9.0")
|
||||||
|
|
|
@ -4,6 +4,7 @@ import android.annotation.SuppressLint
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addActors
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||||
|
@ -86,12 +87,15 @@ class UASerialProvider : MainAPI() {
|
||||||
val tvType = TvType.Movie
|
val tvType = TvType.Movie
|
||||||
val description = document.selectFirst(".text")?.text()?.trim()
|
val description = document.selectFirst(".text")?.text()?.trim()
|
||||||
val rating = document.select("div.rating__item--imdb div.number").text().toRatingInt()
|
val rating = document.select("div.rating__item--imdb div.number").text().toRatingInt()
|
||||||
|
val actors = titleJson.actor.map { it.name }
|
||||||
|
|
||||||
return newMovieLoadResponse(title, url, tvType, url) {
|
return newMovieLoadResponse(title, url, tvType, url) {
|
||||||
this.posterUrl = poster
|
this.posterUrl = poster
|
||||||
this.year = year
|
this.year = year
|
||||||
this.plot = description
|
this.plot = description
|
||||||
this.tags = tags
|
this.tags = tags
|
||||||
this.rating = rating
|
this.rating = rating
|
||||||
|
addActors(actors)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Parse info for Serials
|
// Parse info for Serials
|
||||||
|
@ -104,7 +108,7 @@ class UASerialProvider : MainAPI() {
|
||||||
val description = document.selectFirst(".text")?.text()?.trim()
|
val description = document.selectFirst(".text")?.text()?.trim()
|
||||||
val rating = document.select("div.rating__item--imdb div.number").text().toRatingInt()
|
val rating = document.select("div.rating__item--imdb div.number").text().toRatingInt()
|
||||||
|
|
||||||
// val actors = full_info[4].select("a").map { it.text() }
|
val actors = titleJson.partOfTVSeries.actor.map { it.name }
|
||||||
|
|
||||||
var episodes: List<Episode> = emptyList()
|
var episodes: List<Episode> = emptyList()
|
||||||
titleJson.partOfTVSeries.containsSeason.map { season ->
|
titleJson.partOfTVSeries.containsSeason.map { season ->
|
||||||
|
@ -129,6 +133,7 @@ class UASerialProvider : MainAPI() {
|
||||||
this.plot = description
|
this.plot = description
|
||||||
this.tags = tags
|
this.tags = tags
|
||||||
this.rating = rating
|
this.rating = rating
|
||||||
|
addActors(actors)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue