Fixed addRating function (#1150)

This commit is contained in:
Davide 2022-06-08 16:54:58 +02:00 committed by GitHub
parent e2d26a4173
commit db04dd2781
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -849,7 +849,7 @@ interface LoadResponse {
var posterUrl: String?
var year: Int?
var plot: String?
var rating: Int? // 1-1000
var rating: Int? // 0-10000
var tags: List<String>?
var duration: Int? // in minutes
var trailers: List<String>?
@ -928,7 +928,7 @@ interface LoadResponse {
}
fun LoadResponse.addRating(value: Int?) {
if (value ?: return < 0 || value > 1000) {
if ((value ?: return) < 0 || value > 10000) {
return
}
this.rating = value