Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ android {
kotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
freeCompilerArgs.add("-Xskip-metadata-version-check")
}
}

Expand Down Expand Up @@ -462,7 +461,6 @@ detekt {
kotlin {
compilerOptions {
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17)
freeCompilerArgs.add("-Xskip-metadata-version-check")
}
}

Expand Down
Binary file modified app/libs/quickjs-kt-android-1.0.5-nuvio.aar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import androidx.datastore.preferences.preferencesDataStore
import com.arflix.tv.data.api.*
import com.arflix.tv.data.model.Addon
import com.arflix.tv.data.model.AddonInstallSource
import com.arflix.tv.data.model.AddonCatalog
import com.arflix.tv.data.model.AddonManifest
import com.arflix.tv.data.model.AddonResource
import com.arflix.tv.data.model.AddonStreamResult
Expand Down Expand Up @@ -1322,11 +1323,17 @@ class StreamRepository @Inject constructor(
val manifest = addon.manifest ?: return false
val normalizedType = type.trim().lowercase(Locale.US)
if (normalizedType.isBlank()) return false
if (manifest.types.any { it.trim().equals(normalizedType, ignoreCase = true) }) return true
if (manifest.catalogs.any { it.type.trim().equals(normalizedType, ignoreCase = true) }) return true
return manifest.resources.any { resource ->
resource.types.any { it.trim().equals(normalizedType, ignoreCase = true) }
}
// Gson can set non-nullable list fields to null when the manifest JSON contains null;
// assign to nullable locals so safe-call checks work correctly at runtime.
val types: List<String>? = manifest.types
val catalogs: List<AddonCatalog>? = manifest.catalogs
val resources: List<AddonResource>? = manifest.resources
if (types?.any { it.trim().equals(normalizedType, ignoreCase = true) } == true) return true
if (catalogs?.any { it.type.trim().equals(normalizedType, ignoreCase = true) } == true) return true
return resources?.any { resource ->
val resTypes: List<String>? = resource.types
resTypes?.any { it.trim().equals(normalizedType, ignoreCase = true) } == true
} == true
}

private fun shouldPreferNativeAnimeIds(addon: Addon): Boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.input.key.*
import androidx.compose.ui.platform.LocalLayoutDirection
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.LayoutDirection
import androidx.compose.ui.unit.dp
import androidx.compose.foundation.clickable

Expand All @@ -32,6 +34,8 @@ fun PluginScreen(
val uiState by viewModel.uiState.collectAsState()
var showAddDialog by remember { mutableStateOf(false) }
val addButtonFocusRequester = remember { FocusRequester() }
val isRtl = LocalLayoutDirection.current == LayoutDirection.Rtl
val sectionNavKey = if (isRtl) Key.DirectionRight else Key.DirectionLeft

LaunchedEffect(Unit) {
kotlinx.coroutines.delay(100)
Expand All @@ -45,9 +49,18 @@ fun PluginScreen(
.padding(bottom = 80.dp)
.fillMaxWidth()
.onPreviewKeyEvent { event ->
if (event.type == KeyEventType.KeyDown && event.key == Key.DirectionLeft) {
onNavigateToSection?.invoke()
return@onPreviewKeyEvent onNavigateToSection != null
if (event.type == KeyEventType.KeyDown) {
when (event.key) {
sectionNavKey -> {
onNavigateToSection?.invoke()
return@onPreviewKeyEvent onNavigateToSection != null
}
Key.Back, Key.Escape -> {
onBackPressed()
return@onPreviewKeyEvent true
}
else -> {}
}
}
false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1526,9 +1526,7 @@ fun SettingsScreen(
"plugins" -> {
com.arflix.tv.ui.screens.plugin.PluginScreen(
onBackPressed = { activeZone = Zone.SECTION },
onNavigateToSection = {
activeZone = Zone.SECTION
}
onNavigateToSection = { activeZone = Zone.SECTION }
)
}
"accounts" -> AccountsSettings(
Expand Down
Loading