mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-17 07:21:58 +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 hapticFeedback = LocalHapticFeedback.current
|
||||||
val coroutineScope = rememberCoroutineScope()
|
val coroutineScope = rememberCoroutineScope()
|
||||||
var selectedTab by rememberSaveable { mutableStateOf(AppScreenTab.Home) }
|
var selectedTab by rememberSaveable { mutableStateOf(AppScreenTab.Home) }
|
||||||
|
val currentBackStackEntry by navController.currentBackStackEntryAsState()
|
||||||
val nativeRequestedTab by remember { NativeTabBridge.requestedTab }.collectAsStateWithLifecycle()
|
val nativeRequestedTab by remember { NativeTabBridge.requestedTab }.collectAsStateWithLifecycle()
|
||||||
val liquidGlassNativeTabBarEnabled by remember {
|
val liquidGlassNativeTabBarEnabled by remember {
|
||||||
ThemeSettingsRepository.liquidGlassNativeTabBarEnabled
|
ThemeSettingsRepository.liquidGlassNativeTabBarEnabled
|
||||||
|
|
@ -975,6 +976,7 @@ private fun MainAppContent(
|
||||||
val isTabletLayout = maxWidth >= 768.dp
|
val isTabletLayout = maxWidth >= 768.dp
|
||||||
val useNativeBottomTabs =
|
val useNativeBottomTabs =
|
||||||
liquidGlassNativeTabBarSupported && liquidGlassNativeTabBarEnabled && initialHomeReady
|
liquidGlassNativeTabBarSupported && liquidGlassNativeTabBarEnabled && initialHomeReady
|
||||||
|
val tabsRouteActive = currentBackStackEntry?.destination?.hasRoute<TabsRoute>() == true
|
||||||
val onProfileSelected: (NuvioProfile) -> Unit = { profile ->
|
val onProfileSelected: (NuvioProfile) -> Unit = { profile ->
|
||||||
profileSwitchLoading = true
|
profileSwitchLoading = true
|
||||||
selectedTab = AppScreenTab.Home
|
selectedTab = AppScreenTab.Home
|
||||||
|
|
@ -1033,6 +1035,7 @@ private fun MainAppContent(
|
||||||
.fillMaxSize()
|
.fillMaxSize()
|
||||||
.padding(innerPadding),
|
.padding(innerPadding),
|
||||||
selectedTab = selectedTab,
|
selectedTab = selectedTab,
|
||||||
|
animateHomeCollectionGifs = tabsRouteActive,
|
||||||
onCatalogClick = onCatalogClick,
|
onCatalogClick = onCatalogClick,
|
||||||
onPosterClick = { meta ->
|
onPosterClick = { meta ->
|
||||||
navController.navigate(DetailRoute(type = meta.type, id = meta.id))
|
navController.navigate(DetailRoute(type = meta.type, id = meta.id))
|
||||||
|
|
@ -1952,6 +1955,7 @@ private fun rememberGuardedPopBackStack(
|
||||||
private fun AppTabHost(
|
private fun AppTabHost(
|
||||||
selectedTab: AppScreenTab,
|
selectedTab: AppScreenTab,
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
|
animateHomeCollectionGifs: Boolean = true,
|
||||||
onCatalogClick: ((HomeCatalogSection) -> Unit)? = null,
|
onCatalogClick: ((HomeCatalogSection) -> Unit)? = null,
|
||||||
onPosterClick: ((MetaPreview) -> Unit)? = null,
|
onPosterClick: ((MetaPreview) -> Unit)? = null,
|
||||||
onPosterLongClick: ((MetaPreview) -> Unit)? = null,
|
onPosterLongClick: ((MetaPreview) -> Unit)? = null,
|
||||||
|
|
@ -1981,6 +1985,7 @@ private fun AppTabHost(
|
||||||
AppScreenTab.Home -> {
|
AppScreenTab.Home -> {
|
||||||
HomeScreen(
|
HomeScreen(
|
||||||
modifier = Modifier.fillMaxSize(),
|
modifier = Modifier.fillMaxSize(),
|
||||||
|
animateCollectionGifs = animateHomeCollectionGifs,
|
||||||
onCatalogClick = onCatalogClick,
|
onCatalogClick = onCatalogClick,
|
||||||
onPosterClick = onPosterClick,
|
onPosterClick = onPosterClick,
|
||||||
onPosterLongClick = onPosterLongClick,
|
onPosterLongClick = onPosterLongClick,
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,15 @@ internal fun buildAddonResourceUrl(
|
||||||
): String {
|
): String {
|
||||||
val encodedId = id.encodeAddonPathSegment()
|
val encodedId = id.encodeAddonPathSegment()
|
||||||
val baseUrl = addonTransportBaseUrl(manifestUrl)
|
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"
|
"$baseUrl/$resource/$type/$encodedId.json"
|
||||||
} else {
|
} else {
|
||||||
"$baseUrl/$resource/$type/$encodedId/$extraPathSegment.json"
|
"$baseUrl/$resource/$type/$encodedId/$extraPathSegment.json"
|
||||||
}
|
}
|
||||||
|
return resourceUrl + query
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue