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,16 +41,31 @@ class WcoStream : ExtractorApi() {
|
|||
|
||||
if (mapped.success) {
|
||||
mapped.media.sources.forEach {
|
||||
sources.add(
|
||||
ExtractorLink(
|
||||
name,
|
||||
name + if (it.label != null) "- ${it.label}" else "",
|
||||
it.file,
|
||||
"",
|
||||
Qualities.P720.value,
|
||||
it.file.contains(".m3u8")
|
||||
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,
|
||||
name + if (it.label != null) " - ${it.label}" else "",
|
||||
it.file,
|
||||
"",
|
||||
Qualities.P720.value,
|
||||
false
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
return sources
|
||||
|
|
Loading…
Reference in a new issue