diff --git a/composeApp/proguard-rules.pro b/composeApp/proguard-rules.pro index 7bd3949e..49a3ed45 100644 --- a/composeApp/proguard-rules.pro +++ b/composeApp/proguard-rules.pro @@ -51,6 +51,9 @@ -keep class com.google.android.exoplayer2.** { *; } -keep interface com.google.android.exoplayer2.** { *; } +-keep class is.xyz.mpv.** { *; } +-keep interface is.xyz.mpv.** { *; } + # Common optional security providers used by okhttp on some devices. -dontwarn okhttp3.internal.platform.** -dontwarn org.conscrypt.** diff --git a/composeApp/src/androidMain/kotlin/com/nuvio/app/features/player/PlayerEngine.android.kt b/composeApp/src/androidMain/kotlin/com/nuvio/app/features/player/PlayerEngine.android.kt index 9df72333..e8621d64 100644 --- a/composeApp/src/androidMain/kotlin/com/nuvio/app/features/player/PlayerEngine.android.kt +++ b/composeApp/src/androidMain/kotlin/com/nuvio/app/features/player/PlayerEngine.android.kt @@ -51,7 +51,6 @@ import androidx.media3.exoplayer.ForwardingRenderer import androidx.media3.exoplayer.Renderer import androidx.media3.exoplayer.source.DefaultMediaSourceFactory import androidx.media3.exoplayer.source.MergingMediaSource -import com.nuvio.app.features.trailer.YoutubeChunkedDataSourceFactory import androidx.media3.exoplayer.text.TextOutput import androidx.media3.exoplayer.trackselection.DefaultTrackSelector import androidx.media3.extractor.DefaultExtractorsFactory diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt index 0f976346..917700ab 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/HomeScreen.kt @@ -746,7 +746,7 @@ fun HomeScreen( when { !hasActiveAddons && !hasRenderableCollectionRows -> { if (continueWatchingPreferences.isVisible && continueWatchingItems.isNotEmpty()) { - item { + item(key = HOME_CONTINUE_WATCHING_SECTION_KEY) { HomeContinueWatchingSection( items = continueWatchingItems, style = continueWatchingPreferences.style, @@ -771,7 +771,7 @@ fun HomeScreen( homeUiState.isLoading && homeUiState.sections.isEmpty() && !hasRenderableCollectionRows -> { if (continueWatchingPreferences.isVisible && continueWatchingItems.isNotEmpty()) { - item { + item(key = HOME_CONTINUE_WATCHING_SECTION_KEY) { HomeContinueWatchingSection( items = continueWatchingItems, style = continueWatchingPreferences.style, @@ -819,7 +819,7 @@ fun HomeScreen( else -> { if (continueWatchingPreferences.isVisible && continueWatchingItems.isNotEmpty()) { - item { + item(key = HOME_CONTINUE_WATCHING_SECTION_KEY) { HomeContinueWatchingSection( items = continueWatchingItems, style = continueWatchingPreferences.style, @@ -877,6 +877,7 @@ fun HomeScreen( } private const val HOME_CATALOG_PREVIEW_LIMIT = 18 +private const val HOME_CONTINUE_WATCHING_SECTION_KEY = "home_continue_watching" internal const val HomeContinueWatchingMaxRecentProgressItems = 300 internal const val HomeNextUpInitialResolutionLimit = 32 private const val MILLIS_PER_DAY = 24L * 60L * 60L * 1000L diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt index 99f36172..fc5bb09f 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/home/components/HomeContinueWatchingSection.kt @@ -26,7 +26,6 @@ import androidx.compose.material3.Text import androidx.compose.material3.contentColorFor import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue -import androidx.compose.runtime.key import androidx.compose.runtime.remember import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -241,67 +240,44 @@ private fun HomeContinueWatchingSectionContent( HomeCatalogSettingsRepository.uiState }.collectAsStateWithLifecycle() - val itemOrderKey = remember(items) { - items.joinToString(separator = "|") { item -> item.continueWatchingRowOrderKey() } - } - - key(itemOrderKey) { - NuvioShelfSection( - title = stringResource(Res.string.compose_settings_page_continue_watching), - entries = items, - modifier = modifier, - headerHorizontalPadding = sectionPadding, - rowContentPadding = PaddingValues(horizontal = sectionPadding), - itemSpacing = layout.itemGap, - showHeaderAccent = !homeCatalogSettings.hideCatalogUnderline, - key = { item -> item.videoId }, - ) { item -> - when (style) { - ContinueWatchingSectionStyle.Card -> ContinueWatchingCard( - item = item, - useEpisodeThumbnails = useEpisodeThumbnails, - blurNextUp = blurNextUp, - onClick = onItemClick?.let { { it(item) } }, - onLongClick = onItemLongPress?.let { { it(item) } }, - ) - ContinueWatchingSectionStyle.Wide -> ContinueWatchingWideCard( - item = item, - layout = layout, - useEpisodeThumbnails = useEpisodeThumbnails, - blurNextUp = blurNextUp, - onClick = onItemClick?.let { { it(item) } }, - onLongClick = onItemLongPress?.let { { it(item) } }, - ) - ContinueWatchingSectionStyle.Poster -> ContinueWatchingPosterCard( - item = item, - layout = layout, - useEpisodeThumbnails = useEpisodeThumbnails, - blurNextUp = blurNextUp, - onClick = onItemClick?.let { { it(item) } }, - onLongClick = onItemLongPress?.let { { it(item) } }, - ) - } + NuvioShelfSection( + title = stringResource(Res.string.compose_settings_page_continue_watching), + entries = items, + modifier = modifier, + headerHorizontalPadding = sectionPadding, + rowContentPadding = PaddingValues(horizontal = sectionPadding), + itemSpacing = layout.itemGap, + showHeaderAccent = !homeCatalogSettings.hideCatalogUnderline, + key = { item -> item.videoId }, + ) { item -> + when (style) { + ContinueWatchingSectionStyle.Card -> ContinueWatchingCard( + item = item, + useEpisodeThumbnails = useEpisodeThumbnails, + blurNextUp = blurNextUp, + onClick = onItemClick?.let { { it(item) } }, + onLongClick = onItemLongPress?.let { { it(item) } }, + ) + ContinueWatchingSectionStyle.Wide -> ContinueWatchingWideCard( + item = item, + layout = layout, + useEpisodeThumbnails = useEpisodeThumbnails, + blurNextUp = blurNextUp, + onClick = onItemClick?.let { { it(item) } }, + onLongClick = onItemLongPress?.let { { it(item) } }, + ) + ContinueWatchingSectionStyle.Poster -> ContinueWatchingPosterCard( + item = item, + layout = layout, + useEpisodeThumbnails = useEpisodeThumbnails, + blurNextUp = blurNextUp, + onClick = onItemClick?.let { { it(item) } }, + onLongClick = onItemLongPress?.let { { it(item) } }, + ) } } } -private fun ContinueWatchingItem.continueWatchingRowOrderKey(): String = - buildString { - append(if (isNextUp) "next" else "progress") - append(':') - append(parentMetaId) - append(':') - append(videoId) - append(':') - append(seasonNumber) - append('x') - append(episodeNumber) - append(":seed=") - append(nextUpSeedSeasonNumber) - append('x') - append(nextUpSeedEpisodeNumber) - } - @Composable fun ContinueWatchingStylePreview( style: ContinueWatchingSectionStyle, diff --git a/iosApp/Configuration/Version.xcconfig b/iosApp/Configuration/Version.xcconfig index 6f9ed2c3..fd39ee07 100644 --- a/iosApp/Configuration/Version.xcconfig +++ b/iosApp/Configuration/Version.xcconfig @@ -1,3 +1,3 @@ -CURRENT_PROJECT_VERSION=83 -MARKETING_VERSION=0.2.11 +CURRENT_PROJECT_VERSION=84 +MARKETING_VERSION=0.2.12 diff --git a/mpvKt b/mpvKt new file mode 160000 index 00000000..01a93062 --- /dev/null +++ b/mpvKt @@ -0,0 +1 @@ +Subproject commit 01a93062dd73f642cbb0511f6a05f1fd344b36a9