mirror of
				https://github.com/hexated/cloudstream-extensions-hexated.git
				synced 2024-08-15 00:03:22 +00:00 
			
		
		
		
	kinoger: fix detail page
This commit is contained in:
		
							parent
							
								
									3955446a36
								
							
						
					
					
						commit
						2da3119c8c
					
				
					 1 changed files with 9 additions and 8 deletions
				
			
		|  | @ -70,17 +70,17 @@ class Kinoger : MainAPI() { | |||
|         val poster = fixUrlNull(document.selectFirst("div.images-border img")?.getImageAttr()) | ||||
|         val description = document.select("div.images-border").text() | ||||
|         val year = """\((\d{4})\)""".toRegex().find(title)?.groupValues?.get(1)?.toIntOrNull() | ||||
|         val type = if (document.selectFirst("label[title=Stream HD+]") | ||||
|                         ?.hasText() == true | ||||
|         ) TvType.Movie else TvType.TvSeries | ||||
|         val tags = document.select("li.category a").map { it.text() } | ||||
| 
 | ||||
|         val recommendations = document.select("ul.ul_related li").mapNotNull { | ||||
|             it.toSearchResult() | ||||
|         } | ||||
| 
 | ||||
|         val script = document.selectFirst("script:containsData(pw.show)")?.data() | ||||
|                 ?.substringAfter("[")?.substringBeforeLast("]")?.replace("\'", "\"") | ||||
|         val json = AppUtils.tryParseJson<List<List<String>>>("[$script]") | ||||
|         val data = script?.substringAfter("[")?.substringBeforeLast("]")?.replace("\'", "\"") | ||||
|         val json = AppUtils.tryParseJson<List<List<String>>>("[$data]") | ||||
| 
 | ||||
|         val type = if(script?.substringBeforeLast(")")?.substringAfterLast(",") == "0.2") TvType.Movie else TvType.TvSeries | ||||
| 
 | ||||
|         val episodes = json?.flatMapIndexed { season: Int, iframes: List<String> -> | ||||
|             iframes.mapIndexed { episode, iframe -> | ||||
|  | @ -96,6 +96,7 @@ class Kinoger : MainAPI() { | |||
|             this.posterUrl = poster | ||||
|             this.year = year | ||||
|             this.plot = description | ||||
|             this.tags = tags | ||||
|             this.recommendations = recommendations | ||||
|         } | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue