mirror of
				https://github.com/recloudstream/cloudstream.git
				synced 2024-08-15 01:53:11 +00:00 
			
		
		
		
	Fixed addRating function (#1150)
This commit is contained in:
		
							parent
							
								
									e2d26a4173
								
							
						
					
					
						commit
						db04dd2781
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue