mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-16 23:12:12 +00:00
fix: stripping off parameters after manifest.json
This commit is contained in:
parent
d342959493
commit
0ce89650c2
2 changed files with 11 additions and 2 deletions
|
|
@ -512,6 +512,7 @@ private fun MainAppContent(
|
|||
val hapticFeedback = LocalHapticFeedback.current
|
||||
val coroutineScope = rememberCoroutineScope()
|
||||
var selectedTab by rememberSaveable { mutableStateOf(AppScreenTab.Home) }
|
||||
val currentBackStackEntry by navController.currentBackStackEntryAsState()
|
||||
val nativeRequestedTab by remember { NativeTabBridge.requestedTab }.collectAsStateWithLifecycle()
|
||||
val liquidGlassNativeTabBarEnabled by remember {
|
||||
ThemeSettingsRepository.liquidGlassNativeTabBarEnabled
|
||||
|
|
@ -975,6 +976,7 @@ private fun MainAppContent(
|
|||
val isTabletLayout = maxWidth >= 768.dp
|
||||
val useNativeBottomTabs =
|
||||
liquidGlassNativeTabBarSupported && liquidGlassNativeTabBarEnabled && initialHomeReady
|
||||
val tabsRouteActive = currentBackStackEntry?.destination?.hasRoute<TabsRoute>() == true
|
||||
val onProfileSelected: (NuvioProfile) -> Unit = { profile ->
|
||||
profileSwitchLoading = true
|
||||
selectedTab = AppScreenTab.Home
|
||||
|
|
@ -1033,6 +1035,7 @@ private fun MainAppContent(
|
|||
.fillMaxSize()
|
||||
.padding(innerPadding),
|
||||
selectedTab = selectedTab,
|
||||
animateHomeCollectionGifs = tabsRouteActive,
|
||||
onCatalogClick = onCatalogClick,
|
||||
onPosterClick = { meta ->
|
||||
navController.navigate(DetailRoute(type = meta.type, id = meta.id))
|
||||
|
|
@ -1952,6 +1955,7 @@ private fun rememberGuardedPopBackStack(
|
|||
private fun AppTabHost(
|
||||
selectedTab: AppScreenTab,
|
||||
modifier: Modifier = Modifier,
|
||||
animateHomeCollectionGifs: Boolean = true,
|
||||
onCatalogClick: ((HomeCatalogSection) -> Unit)? = null,
|
||||
onPosterClick: ((MetaPreview) -> Unit)? = null,
|
||||
onPosterLongClick: ((MetaPreview) -> Unit)? = null,
|
||||
|
|
@ -1981,6 +1985,7 @@ private fun AppTabHost(
|
|||
AppScreenTab.Home -> {
|
||||
HomeScreen(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
animateCollectionGifs = animateHomeCollectionGifs,
|
||||
onCatalogClick = onCatalogClick,
|
||||
onPosterClick = onPosterClick,
|
||||
onPosterLongClick = onPosterLongClick,
|
||||
|
|
|
|||
|
|
@ -12,11 +12,15 @@ internal fun buildAddonResourceUrl(
|
|||
): String {
|
||||
val encodedId = id.encodeAddonPathSegment()
|
||||
val baseUrl = addonTransportBaseUrl(manifestUrl)
|
||||
return if (extraPathSegment.isNullOrEmpty()) {
|
||||
val query = manifestUrl.substringAfter("?", "").let { query ->
|
||||
if (query.isBlank()) "" else "?$query"
|
||||
}
|
||||
val resourceUrl = if (extraPathSegment.isNullOrEmpty()) {
|
||||
"$baseUrl/$resource/$type/$encodedId.json"
|
||||
} else {
|
||||
"$baseUrl/$resource/$type/$encodedId/$extraPathSegment.json"
|
||||
}
|
||||
return resourceUrl + query
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -43,4 +47,4 @@ internal fun String.encodeAddonPathSegment(): String =
|
|||
}
|
||||
}
|
||||
|
||||
private const val ADDON_URL_HEX = "0123456789ABCDEF"
|
||||
private const val ADDON_URL_HEX = "0123456789ABCDEF"
|
||||
|
|
|
|||
Loading…
Reference in a new issue