wcostream - parsing qualities from m3u8

This commit is contained in:
Arjix 2021-09-26 23:22:42 +03:00 committed by GitHub
parent f56b6c168d
commit ce844d5068
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}
}