mirror of
				https://github.com/recloudstream/cloudstream.git
				synced 2024-08-15 01:53:11 +00:00 
			
		
		
		
	Update AnimePaheProvider.kt
This commit is contained in:
		
							parent
							
								
									d24a01b3c5
								
							
						
					
					
						commit
						8f9bb9f6f4
					
				
					 1 changed files with 16 additions and 3 deletions
				
			
		|  | @ -207,8 +207,8 @@ class AnimePaheProvider : MainAPI() { | |||
|                     ) | ||||
|                 } | ||||
|             } else { | ||||
|                 for (page in 0..lastPage) { | ||||
|                     for (i in 0..perPage) { | ||||
|                 for (page in 0 until lastPage) { | ||||
|                     for (i in 0 until perPage) { | ||||
|                         if (ep <= total) { | ||||
|                             episodes.add( | ||||
|                                 AnimeEpisode( | ||||
|  | @ -295,6 +295,18 @@ class AnimePaheProvider : MainAPI() { | |||
|         return s?.toIntOrNull() != null | ||||
|     } | ||||
| 
 | ||||
|     private fun pow(base: Int, expo: Int): Long{ | ||||
|         // does not handle infinity | ||||
|         var exponent = expo | ||||
|         var result: Long = 1 | ||||
| 
 | ||||
|         while (exponent != 0) { | ||||
|             result *= base.toLong() | ||||
|             --exponent | ||||
|         } | ||||
|         return result | ||||
|     } | ||||
| 
 | ||||
|     private fun cookieStrToMap(cookie: String): Map<String, String> { | ||||
|         val cookies = mutableMapOf<String, String>() | ||||
|         for (string in cookie.split("; ")) { | ||||
|  | @ -484,10 +496,11 @@ class AnimePaheProvider : MainAPI() { | |||
|                     null | ||||
|                 } | ||||
|             }).filterNotNull())[0] | ||||
|             link = "https://animepahe.com/api?m=links&id=${ep?.animeId}&session=${ep?.session}&p=kwik" | ||||
|             link = "https://animepahe.com/api?m=links&id=${ep.animeId}&session=${ep.session}&p=kwik" | ||||
|         } | ||||
|         val req = khttp.get(link, headers = headers) | ||||
|         val data = mapper.readValue<AnimePaheEpisodeLoadLinks>(req.text) | ||||
|         println("gggkk: $data") | ||||
| 
 | ||||
|         val qualities = ArrayList<ExtractorLink>() | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue