StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.
Kotlin iptv-player
Fix FFmpeg verifier and restore build health
David Nashashc35222672d1c
diff --git a/app/src/main/java/com/streamvault/app/ui/screens/player/PlayerContentResolutionSupport.kt b/app/src/main/java/com/streamvault/app/ui/screens/player/PlayerContentResolutionSupport.ktindex 3f6b7dfc..79bdb861 100644--- a/app/src/main/java/com/streamvault/app/ui/screens/player/PlayerContentResolutionSupport.kt+++ b/app/src/main/java/com/streamvault/app/ui/screens/player/PlayerContentResolutionSupport.kt@@ -1,7 +1,7 @@package com.streamvault.app.ui.screens.player-import com.streamvault.data.remote.xtream.XtreamStreamUrlResolverimport com.streamvault.data.remote.stalker.StalkerPlaybackResolutionException+import com.streamvault.data.remote.xtream.XtreamStreamUrlResolverimport com.streamvault.data.security.CredentialDecryptionExceptionimport com.streamvault.domain.model.ContentTypeimport com.streamvault.domain.model.Episode@@ -58,55 +58,55 @@ internal fun buildSeriesEpisodeResolution(currentArtworkUrl},resolvedTitle = if (resolvedEpisode != null && currentContentType == ContentType.SERIES_EPISODE) {+ buildEpisodePlaybackTitle(resolvedEpisode)+ } else {+ null+ },+ resolvedSeasonNumber = resolvedEpisode?.seasonNumber ?: seasonNumber,resolvedEpisodeNumber = resolvedEpisode?.episodeNumber ?: episodeNumber- val streamInfoResult = channelRepository.getStreamInfo(channel)- if (streamInfoResult.isSuccess) {- streamInfoResult.getOrNull()?.let { resolved ->- return PlayerPlaybackStreamResolution(- streamInfo = resolved.copy(title = resolved.title ?: currentTitle)- )- }- } else {- // Propagate the underlying error so the caller can show it to the user.- (streamInfoResult as? Result.Error)?.message?.let { errorMsg ->- return PlayerPlaybackStreamResolution(- streamInfo = null,- resolutionFailureMessage = errorMsg- )- }- }- }- }- }-- ContentType.MOVIE -> {- movieRepository.getMovie(internalContentId)?.let { movie ->- fallbackStreamId = movie.streamId.takeIf { it > 0L }- fallbackContainerExtension = movie.containerExtension- val streamInfoResult = movieRepository.getStreamInfo(movie)- if (streamInfoResult.isSuccess) {- streamInfoResult.getOrNull()?.let { resolved ->+ )}internal suspend fun resolvePlayerPlaybackStreamInfo(logicalUrl: String,+ internalContentId: Long,providerId: Long,+ contentType: ContentType,currentTitle: String,currentSeries: Series?,currentEpisode: Episode?,channelRepository: ChannelRepository,movieRepository: MovieRepository,seriesRepository: SeriesRepository,+ xtreamStreamUrlResolver: XtreamStreamUrlResolver): PlayerPlaybackStreamResolution {var fallbackStreamId: Long? = nullvar fallbackContainerExtension: String? = null++ if (providerId > 0L && internalContentId > 0L) {+ when (contentType) {+ ContentType.LIVE -> {+ channelRepository.getChannel(internalContentId)?.let { channel ->+ fallbackStreamId = channel.streamId.takeIf { it > 0L }+ ?: channel.epgChannelId?.toLongOrNull()+ val streamInfoResult = if (shouldUseStoredLiveStreamInfo(logicalUrl, channel.streamUrl)) {+ channelRepository.getStreamInfo(channel)+ } else {+ Result.success(null)+ }+ if (streamInfoResult.isSuccess) {+ streamInfoResult.getOrNull()?.let { resolved ->+ return PlayerPlaybackStreamResolution(+ streamInfo = resolved.copy(title = resolved.title ?: currentTitle)+ )+ }+ } else {+ (streamInfoResult as? Result.Error)?.message?.let { errorMsg ->return PlayerPlaybackStreamResolution(streamInfo = null,resolutionFailureMessage = errorMsg)}-=======->>>>>>> pr-64-current}}}@@ -196,7 +196,8 @@ internal suspend fun resolvePlayerPlaybackStreamInfo(} catch (e: StalkerPlaybackResolutionException) {return PlayerPlaybackStreamResolution(streamInfo = null,- resolutionFailureMessage = e.message ?: "We couldn't resolve a playable Stalker stream for this item."+ resolutionFailureMessage = e.message+ ?: "We couldn't resolve a playable Stalker stream for this item.")}diff --git a/app/src/test/java/com/streamvault/app/ui/screens/epg/EpgViewModelTest.kt b/app/src/test/java/com/streamvault/app/ui/screens/epg/EpgViewModelTest.ktindex 4413ff65..c88be51f 100644--- a/app/src/test/java/com/streamvault/app/ui/screens/epg/EpgViewModelTest.kt+++ b/app/src/test/java/com/streamvault/app/ui/screens/epg/EpgViewModelTest.kt@@ -36,6 +36,7 @@ import com.streamvault.domain.usecase.ScheduleRecordingimport kotlinx.coroutines.Dispatchersimport javax.inject.Provider as InjectProviderimport kotlinx.coroutines.ExperimentalCoroutinesApi+import kotlinx.coroutines.flow.MutableStateFlowimport kotlinx.coroutines.flow.flowOfimport kotlinx.coroutines.runBlockingimport kotlinx.coroutines.test.StandardTestDispatcher@@ -90,6 +91,7 @@ class EpgViewModelTest {whenever(preferencesRepository.showAllChannelsCategory).thenReturn(flowOf(true))whenever(combinedM3uRepository.getActiveLiveSource()).thenReturn(flowOf(null))whenever(preferencesRepository.guideDefaultCategoryId).thenReturn(flowOf(null))+ whenever(livePreviewHandoffManager.reverseSessionFlow).thenReturn(MutableStateFlow(null))runBlocking {whenever(epgRepository.getResolvedProgramsForChannels(any(), any(), any(), any())).thenReturn(emptyMap())whenever(epgRepository.getProgramsForChannelsSnapshot(any(), any(), any(), any())).thenReturn(emptyMap())diff --git a/app/src/test/java/com/streamvault/app/ui/screens/home/HomeViewModelTest.kt b/app/src/test/java/com/streamvault/app/ui/screens/home/HomeViewModelTest.ktindex e0079027..1755ab65 100644--- a/app/src/test/java/com/streamvault/app/ui/screens/home/HomeViewModelTest.kt+++ b/app/src/test/java/com/streamvault/app/ui/screens/home/HomeViewModelTest.kt@@ -28,6 +28,7 @@ import com.streamvault.domain.usecase.UnlockParentalCategoryimport com.streamvault.player.PlayerEngineimport kotlinx.coroutines.Dispatchersimport kotlinx.coroutines.ExperimentalCoroutinesApi+import kotlinx.coroutines.flow.MutableStateFlowimport kotlinx.coroutines.flow.flowOfimport kotlinx.coroutines.launchimport kotlinx.coroutines.test.*@@ -77,6 +78,7 @@ class HomeViewModelTest {whenever(providerRepository.getActiveProvider()).thenReturn(flowOf(null))whenever(combinedM3uRepository.getActiveLiveSource()).thenReturn(flowOf(null))whenever(combinedM3uRepository.getActiveLiveSourceOptions()).thenReturn(flowOf(emptyList()))+ whenever(livePreviewHandoffManager.reverseSessionFlow).thenReturn(MutableStateFlow(null))whenever(preferencesRepository.parentalControlLevel).thenReturn(flowOf(0))whenever(favoriteRepository.getFavorites(any<Long>(), eq(ContentType.LIVE))).thenReturn(flowOf(emptyList()))whenever(favoriteRepository.getFavorites(any<List<Long>>(), eq(ContentType.LIVE))).thenReturn(flowOf(emptyList()))diff --git a/data/src/test/java/com/streamvault/data/repository/EpgRepositoryImplTest.kt b/data/src/test/java/com/streamvault/data/repository/EpgRepositoryImplTest.ktindex ca90e83d..f7af912f 100644--- a/data/src/test/java/com/streamvault/data/repository/EpgRepositoryImplTest.kt+++ b/data/src/test/java/com/streamvault/data/repository/EpgRepositoryImplTest.kt@@ -67,6 +67,7 @@ class EpgRepositoryImplTest {runBlocking {whenever(providerDao.getById(any())).thenReturn(null)whenever(preferencesRepository.getEpgTimeShiftMinutes(any())).thenReturn(0)+ whenever(preferencesRepository.epgTimeShiftMinutes(any())).thenReturn(flowOf(0))}}diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex 80dd1cab..b2b4d33d 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -17,9 +17,12 @@ All notable product changes are recorded in this document.### Fixed+- Fixed the bundled FFmpeg Media3 artifact so MPEG Layer II audio (`audio/mpeg-L2`) maps to the bundled `mp2` decoder and release builds pass FFmpeg verification again.+- Fixed a broken player content-resolution merge that could leave the app failing to compile.- Fixed player stream-info failures to preserve and surface the underlying error message instead of dropping it.- Fixed decoder error recovery to retry against alternate stream formats when available.- Fixed XMLTV parsing for ISO timestamps that include timezone offsets.+- Fixed EPG repository test setup so reactive time-shift lookups are stubbed correctly during build verification.- Fixed completed local download playback so `content://`/`file://` files do not consume the provider download lease and do not pause active downloads.- Fixed failed download Resume to clear partial output and restart through the scheduler.- Fixed provider playback interruptions leaving downloads stuck in `DOWNLOADING` by cancelling the active OkHttp call and resetting the partial row to zero-byte `PAUSED` state.diff --git a/player/libs/media3-decoder-ffmpeg-1.9.2.aar b/player/libs/media3-decoder-ffmpeg-1.9.2.aarindex f0486fa5..765be494 100644Binary files a/player/libs/media3-decoder-ffmpeg-1.9.2.aar and b/player/libs/media3-decoder-ffmpeg-1.9.2.aar differdiff --git a/player/src/main/java/com/streamvault/player/playback/PlayerRetryPolicy.kt b/player/src/main/java/com/streamvault/player/playback/PlayerRetryPolicy.ktindex b931cf3f..f6add38b 100644--- a/player/src/main/java/com/streamvault/player/playback/PlayerRetryPolicy.kt+++ b/player/src/main/java/com/streamvault/player/playback/PlayerRetryPolicy.kt@@ -70,7 +70,9 @@ class PlayerRetryPolicy(PlaybackErrorCategory.LIVE_WINDOW -> truePlaybackErrorCategory.NETWORK,PlaybackErrorCategory.HTTP_SERVER,+ PlaybackErrorCategory.EMPTY_RESPONSE,PlaybackErrorCategory.UNKNOWN -> streamContext.isLive+ PlaybackErrorCategory.PROVIDER_LIMIT -> falsePlaybackErrorCategory.SOURCE_MALFORMED -> streamContext.resolvedStreamType == ResolvedStreamType.HLSPlaybackErrorCategory.HTTP_AUTH,PlaybackErrorCategory.SSL,