fixed hls shit

This commit is contained in:
Arjix 2021-09-02 00:36:41 +03:00 committed by GitHub
parent dffa7a39c4
commit e6e93225ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ import com.lagradost.cloudstream3.mvvm.logError
class M3u8Helper {
private val ENCRYPTION_DETECTION_REGEX = Regex("#EXT-X-KEY:METHOD=([^,]+),")
private val ENCRYPTION_URL_IV_REGEX = Regex("#EXT-X-KEY:METHOD=([^,]+),URI=\"([^\"]+)\"(?:,IV=(.*))?")
private val QUALITY_REGEX = Regex("""#EXT-X-STREAM-INF:.*RESOLUTION=\d+x(\d+).*\n(.*)""")
private val QUALITY_REGEX = Regex("""#EXT-X-STREAM-INF:.*(?:RESOLUTION=\d+x(\d+))?.*\n(.*)""")
private val TS_EXTENSION_REGEX = Regex("""(.*\.ts.*)""")
private fun absoluteExtensionDetermination(url: String): String? {
@ -103,7 +103,7 @@ class M3u8Helper {
yield(
M3u8Stream(
m3u8Link,
quality.toInt(),
quality.toIntOrNull(),
m3u8.headers
)
)