Update M3u8Helper.kt

This commit is contained in:
Arjix 2021-09-04 17:26:36 +03:00 committed by GitHub
parent dbc36d1388
commit 2458ff89ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,7 +10,7 @@ import kotlin.math.pow
class M3u8Helper { class M3u8Helper {
private val ENCRYPTION_DETECTION_REGEX = Regex("#EXT-X-KEY:METHOD=([^,]+),") 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 ENCRYPTION_URL_IV_REGEX = Regex("#EXT-X-KEY:METHOD=([^,]+),URI=\"([^\"]+)\"(?:,IV=(.*))?")
private val QUALITY_REGEX = Regex("""#EXT-X-STREAM-INF:.*(?:RESOLUTION=\d+x(\d+))?.*\s(.*)""") private val QUALITY_REGEX = Regex("""#EXT-X-STREAM-INF:.*(?:RESOLUTION=\d+x(\d+))?.*\s+(.*)""")
private val TS_EXTENSION_REGEX = Regex("""(.*\.ts.*)""") private val TS_EXTENSION_REGEX = Regex("""(.*\.ts.*)""")
fun absoluteExtensionDetermination(url: String): String? { fun absoluteExtensionDetermination(url: String): String? {