remove hardcoded player label

This commit is contained in:
tapframe 2026-04-02 15:38:38 +05:30
parent 3ed42931ae
commit 97fb20ad3c
3 changed files with 29 additions and 13 deletions

View file

@ -749,7 +749,20 @@ private fun MainAppContent(
modifier = Modifier.fillMaxSize(),
)
}
composable<PlayerRoute> { backStackEntry ->
composable<PlayerRoute>(
enterTransition = {
if (isIos) fadeIn(animationSpec = tween(220)) else null
},
exitTransition = {
if (isIos) fadeOut(animationSpec = tween(220)) else null
},
popEnterTransition = {
if (isIos) fadeIn(animationSpec = tween(220)) else null
},
popExitTransition = {
if (isIos) fadeOut(animationSpec = tween(220)) else null
},
) { backStackEntry ->
val route = backStackEntry.toRoute<PlayerRoute>()
val launch = remember(route.launchId) { PlayerLaunchStore.get(route.launchId) }
if (launch == null) {

View file

@ -119,7 +119,6 @@ internal fun PlayerControlsShell(
seasonNumber = seasonNumber,
episodeNumber = episodeNumber,
episodeTitle = episodeTitle,
backendLabel = "Android · Media3 ExoPlayer",
metrics = metrics,
onBack = onBack,
modifier = Modifier
@ -171,7 +170,6 @@ private fun PlayerHeader(
seasonNumber: Int?,
episodeNumber: Int?,
episodeTitle: String?,
backendLabel: String,
metrics: PlayerLayoutMetrics,
onBack: () -> Unit,
modifier: Modifier = Modifier,
@ -236,13 +234,6 @@ private fun PlayerHeader(
overflow = TextOverflow.Ellipsis,
)
}
Text(
text = backendLabel,
style = typeScale.labelXs,
color = Color.White.copy(alpha = 0.9f),
maxLines = 1,
overflow = TextOverflow.Ellipsis,
)
}
NuvioBackButton(

View file

@ -56,10 +56,12 @@ object PluginRepository {
fun initialize() {
val effectiveProfileId = resolveEffectiveProfileId(ProfileRepository.activeProfileId)
val shouldRefreshStoredRepos = !initialized || currentProfileId != effectiveProfileId
ensureStateLoadedForProfile(effectiveProfileId)
if (!shouldRefreshStoredRepos) return
_uiState.value.repositories.forEach { repo ->
refreshRepository(repo.manifestUrl)
refreshRepositoryInternal(repo.manifestUrl, pushAfterRefresh = false, ensureInitialized = false)
}
}
@ -184,12 +186,22 @@ object PluginRepository {
fun refreshAll() {
initialize()
_uiState.value.repositories.forEach { repo ->
refreshRepository(repo.manifestUrl)
refreshRepositoryInternal(repo.manifestUrl, pushAfterRefresh = false, ensureInitialized = false)
}
}
fun refreshRepository(manifestUrl: String, pushAfterRefresh: Boolean = false) {
initialize()
refreshRepositoryInternal(manifestUrl, pushAfterRefresh, ensureInitialized = true)
}
private fun refreshRepositoryInternal(
manifestUrl: String,
pushAfterRefresh: Boolean,
ensureInitialized: Boolean,
) {
if (ensureInitialized) {
initialize()
}
val existingJob = activeRefreshJobs[manifestUrl]
if (existingJob?.isActive == true) return