uaserialspro: Fix rating
This commit is contained in:
parent
0e983d651f
commit
7b54cc0e5d
2 changed files with 6 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")
|
||||||
|
|
|
@ -23,6 +23,7 @@ import com.lagradost.cloudstream3.newAnimeLoadResponse
|
||||||
import com.lagradost.cloudstream3.newAnimeSearchResponse
|
import com.lagradost.cloudstream3.newAnimeSearchResponse
|
||||||
import com.lagradost.cloudstream3.newHomePageResponse
|
import com.lagradost.cloudstream3.newHomePageResponse
|
||||||
import com.lagradost.cloudstream3.newMovieLoadResponse
|
import com.lagradost.cloudstream3.newMovieLoadResponse
|
||||||
|
import com.lagradost.cloudstream3.toRatingInt
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||||
import com.lagradost.models.AESPlayerDecodedModel
|
import com.lagradost.models.AESPlayerDecodedModel
|
||||||
|
@ -71,7 +72,7 @@ class UASerialsProProvider : MainAPI() {
|
||||||
private val yearSelector = "a[href*=https://uaserials.pro/year/]"
|
private val yearSelector = "a[href*=https://uaserials.pro/year/]"
|
||||||
// private val playerSelector = "iframe"
|
// private val playerSelector = "iframe"
|
||||||
private val descriptionSelector = ".full-text"
|
private val descriptionSelector = ".full-text"
|
||||||
// private val ratingSelector = ".pmovie__subrating img"
|
private val ratingSelector = ".short-rate-in"
|
||||||
|
|
||||||
private val listAESModel = object : TypeToken<List<AESPlayerDecodedModel>>() { }.type
|
private val listAESModel = object : TypeToken<List<AESPlayerDecodedModel>>() { }.type
|
||||||
private val listDecodedJSONModel = object : TypeToken<List<DecodedJSON>>() { }.type
|
private val listDecodedJSONModel = object : TypeToken<List<DecodedJSON>>() { }.type
|
||||||
|
@ -128,6 +129,7 @@ class UASerialsProProvider : MainAPI() {
|
||||||
val tags = mutableListOf<String>()
|
val tags = mutableListOf<String>()
|
||||||
val actors = mutableListOf<String>()
|
val actors = mutableListOf<String>()
|
||||||
val year = document.select(yearSelector).text().substringAfter(": ").substringBefore("-").toIntOrNull()
|
val year = document.select(yearSelector).text().substringAfter(": ").substringBefore("-").toIntOrNull()
|
||||||
|
val rating = document.selectFirst(ratingSelector)!!.text().toRatingInt()
|
||||||
|
|
||||||
document.select(".short-list li").forEach { menu ->
|
document.select(".short-list li").forEach { menu ->
|
||||||
with(menu){
|
with(menu){
|
||||||
|
@ -188,6 +190,7 @@ class UASerialsProProvider : MainAPI() {
|
||||||
newAnimeLoadResponse(title, url, tvType) {
|
newAnimeLoadResponse(title, url, tvType) {
|
||||||
this.posterUrl = poster
|
this.posterUrl = poster
|
||||||
this.engName = engTitle
|
this.engName = engTitle
|
||||||
|
this.rating = rating
|
||||||
this.year = year
|
this.year = year
|
||||||
this.plot = description
|
this.plot = description
|
||||||
this.tags = tags
|
this.tags = tags
|
||||||
|
@ -198,6 +201,7 @@ class UASerialsProProvider : MainAPI() {
|
||||||
newMovieLoadResponse(title, url, TvType.Movie, "$title, ${movieJson[0].url}") {
|
newMovieLoadResponse(title, url, TvType.Movie, "$title, ${movieJson[0].url}") {
|
||||||
this.posterUrl = poster
|
this.posterUrl = poster
|
||||||
this.name = engTitle
|
this.name = engTitle
|
||||||
|
this.rating = rating
|
||||||
this.year = year
|
this.year = year
|
||||||
this.plot = description
|
this.plot = description
|
||||||
this.tags = tags
|
this.tags = tags
|
||||||
|
|
Loading…
Reference in a new issue