small fix to test and m3u8

This commit is contained in:
LagradOst 2022-05-15 20:49:26 +02:00
parent 88e1719085
commit 670c613f71
2 changed files with 7 additions and 6 deletions

View file

@ -124,7 +124,10 @@ class M3u8Helper {
app.get(m3u8.streamUrl, headers = m3u8.headers).text
}
var hasAnyContent = false
for (match in QUALITY_REGEX.findAll(response)) {
hasAnyContent = true
var (quality, m3u8Link, m3u8Link2) = match.destructured
if (m3u8Link.isEmpty()) m3u8Link = m3u8Link2
if (absoluteExtensionDetermination(m3u8Link) == "m3u8") {
@ -152,11 +155,11 @@ class M3u8Helper {
)
)
}
if (returnThis) {
if (returnThis || !hasAnyContent) {
yield(
M3u8Stream(
m3u8.streamUrl,
0,
Qualities.Unknown.value,
m3u8.headers
)
)