Merge branch 'dev' of https://github.com/tapframe/NuvioTV into dev
This commit is contained in:
commit
3d4e22dfee
2 changed files with 8 additions and 5 deletions
|
|
@ -106,11 +106,6 @@ object StreamAutoPlaySelector {
|
|||
StreamAutoPlayMode.FIRST_STREAM -> candidateStreams.firstOrNull { it.getStreamUrl() != null }
|
||||
StreamAutoPlayMode.REGEX_MATCH -> {
|
||||
val pattern = regexPattern.trim()
|
||||
|
||||
// Skip regex entirely if pattern is blank
|
||||
if (pattern.isBlank()) {
|
||||
return null
|
||||
}
|
||||
|
||||
// Try to compile the user regex
|
||||
val userRegex = runCatching { Regex(pattern, RegexOption.IGNORE_CASE) }.getOrNull() ?: return null
|
||||
|
|
|
|||
|
|
@ -180,6 +180,14 @@ class StreamScreenViewModel @Inject constructor(
|
|||
directAutoPlayModeInitializedForSession = true
|
||||
}
|
||||
|
||||
val rawRegex = playerSettings.streamAutoPlayRegex.orEmpty().trim()
|
||||
val isEffectivelyEmptyRegex = rawRegex.isEmpty() || !rawRegex.any { it.isLetterOrDigit() }
|
||||
|
||||
if (playerSettings.streamAutoPlayMode == StreamAutoPlayMode.REGEX_MATCH && isEffectivelyEmptyRegex) {
|
||||
directAutoPlayFlowEnabledForSession = false
|
||||
autoPlayHandledForSession = true
|
||||
}
|
||||
|
||||
val directFlowActive = directAutoPlayFlowEnabledForSession
|
||||
var resolvedAutoPlayTarget = false
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue