mirror of
				https://github.com/recloudstream/cloudstream.git
				synced 2024-08-15 01:53:11 +00:00 
			
		
		
		
	wcostream - parsing qualities from m3u8
This commit is contained in:
		
							parent
							
								
									f56b6c168d
								
							
						
					
					
						commit
						ce844d5068
					
				
					 1 changed files with 24 additions and 9 deletions
				
			
		|  | @ -41,6 +41,20 @@ class WcoStream : ExtractorApi() { | |||
| 
 | ||||
|         if (mapped.success) { | ||||
|             mapped.media.sources.forEach { | ||||
|                 if (it.file.contains("m3u8")) { | ||||
|                     hlsHelper.m3u8Generation(M3u8Helper.M3u8Stream(it.file, null)).forEach { stream -> | ||||
|                         sources.add( | ||||
|                             ExtractorLink( | ||||
|                                 name, | ||||
|                                 name + if (stream.quality != null) " - ${stream.quality}" else "", | ||||
|                                 stream.streamUrl, | ||||
|                                 "", | ||||
|                                 getQualityFromName(stream.quality.toString()), | ||||
|                                 true | ||||
|                             ) | ||||
|                         ) | ||||
|                     } | ||||
|                 } else { | ||||
|                     sources.add( | ||||
|                         ExtractorLink( | ||||
|                             name, | ||||
|  | @ -48,11 +62,12 @@ class WcoStream : ExtractorApi() { | |||
|                             it.file, | ||||
|                             "", | ||||
|                             Qualities.P720.value, | ||||
|                         it.file.contains(".m3u8") | ||||
|                             false | ||||
|                         ) | ||||
|                     ) | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         return sources | ||||
|     } | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue