StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.
Kotlin iptv-player
chore(changelog): update changelog for version 1.2.2 with new features, changes, and fixes test(favorites): add playback quality preference to favorites screen host test test(vod): refactor VodTrackSelectionSheet test for improved readability fix(playback): optimize time format initialization in PlayerScheduleByTimeDialog test(recording): include ScheduleRecordingWindow in PlayerRecordingCoordinator test test(settings): update settingsContent lambda to accept additional parameter in SettingsRouteGraphBehavior test
David Nashashcf2b4e227cd9
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex 1c0e6f4d..3dc83601 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -1,6 +1,18 @@# ChangelogAll notable product changes are recorded in this document.+## [1.2.2]++### Added+- Added time-based recording scheduling so live channels without EPG data can be recorded for a chosen start time and duration, with daily and weekly repeat options, from the player's recording menu.++### Changed+- Localized player recording notices and EPG recording messages across all supported locales.++### Fixed+- Fixed audio stopping after a while.+- Fixed the player crashing when scheduling a recording (Schedule, Record Daily, or Record Weekly): the recording coordinator called itself instead of the scheduling use case, causing a stack overflow.+- Fixed the notification permission prompt running the recording action before the permission result was known.## [1.2.1]diff --git a/feature/catalog/src/androidTest/java/com/streamvault/feature/catalog/presentation/favorites/FavoritesScreenHostTest.kt b/feature/catalog/src/androidTest/java/com/streamvault/feature/catalog/presentation/favorites/FavoritesScreenHostTest.ktindex 54e2e342..b6ed8059 100644--- a/feature/catalog/src/androidTest/java/com/streamvault/feature/catalog/presentation/favorites/FavoritesScreenHostTest.kt+++ b/feature/catalog/src/androidTest/java/com/streamvault/feature/catalog/presentation/favorites/FavoritesScreenHostTest.kt@@ -14,6 +14,7 @@ import androidx.tv.material3.MaterialThemeimport com.google.common.truth.Truth.assertThatimport com.streamvault.core.navigation.AppDestinationimport com.streamvault.data.local.dao.ChannelPreferenceDao+import com.streamvault.data.local.dao.PlaybackQualityPreferenceDaoimport com.streamvault.data.local.dao.SearchHistoryDaoimport com.streamvault.data.preferences.PreferencesCorruptionRecoveryimport com.streamvault.data.preferences.PreferencesRepository@@ -28,6 +29,7 @@ import com.streamvault.domain.repository.MovieRepositoryimport com.streamvault.domain.repository.PlaybackHistoryRepositoryimport com.streamvault.domain.repository.ProviderRepositoryimport com.streamvault.domain.repository.SeriesRepository+import com.streamvault.domain.trakt.TraktFavoritesimport com.streamvault.domain.usecase.GetContinueWatchingimport com.streamvault.feature.catalog.api.CatalogScaffoldContentimport kotlinx.coroutines.flow.flowOf@@ -73,11 +75,13 @@ class FavoritesScreenHostTest {val playbackHistoryRepository: PlaybackHistoryRepository = mock()val providerRepository: ProviderRepository = mock()val channelPreferenceDao: ChannelPreferenceDao = mock()+ val playbackQualityPreferenceDao: PlaybackQualityPreferenceDao = mock()val searchHistoryDao: SearchHistoryDao = mock()val appContext = ApplicationProvider.getApplicationContext<Context>()val preferencesRepository = PreferencesRepository(context = appContext,channelPreferenceDao = channelPreferenceDao,+ playbackQualityPreferenceDao = playbackQualityPreferenceDao,searchHistoryDao = searchHistoryDao,corruptionRecovery = PreferencesCorruptionRecovery(appContext))@@ -110,7 +114,8 @@ class FavoritesScreenHostTest {playbackHistoryRepository = playbackHistoryRepository,providerRepository = providerRepository,preferencesRepository = preferencesRepository,- getContinueWatching = GetContinueWatching(playbackHistoryRepository)+ getContinueWatching = GetContinueWatching(playbackHistoryRepository),+ traktFavorites = mock())composeRule.setContent {diff --git a/feature/playback/src/androidTest/java/com/streamvault/feature/playback/player/VodTrackSelectionSheetTest.kt b/feature/playback/src/androidTest/java/com/streamvault/feature/playback/player/VodTrackSelectionSheetTest.ktindex fdb6d8b8..881a4dad 100644--- a/feature/playback/src/androidTest/java/com/streamvault/feature/playback/player/VodTrackSelectionSheetTest.kt+++ b/feature/playback/src/androidTest/java/com/streamvault/feature/playback/player/VodTrackSelectionSheetTest.kt@@ -33,9 +33,22 @@ class VodTrackSelectionSheetTest {var background by remember { mutableStateOf(0x80000000.toInt()) }var offset by remember { mutableStateOf(0) }StreamVaultTheme {- VodTrackSelectionSheet(TrackType.TEXT, tracks, offset, scale, background, true,- { dismissals++ }, { selected = it }, { searches++ }, { imports++ },- { offset += it }, { offset = 0 }, { scale = it }, { background = (it * 255 / 100) shl 24 })+ VodTrackSelectionSheet(+ trackType = TrackType.TEXT,+ tracks = tracks,+ offsetMs = offset,+ textScale = scale,+ backgroundColor = background,+ onlineAvailable = true,+ onDismiss = { dismissals++ },+ onSelectTrack = { selected = it },+ onSearchOnline = { searches++ },+ onLoadLocal = { imports++ },+ onAdjustOffset = { offset += it },+ onResetOffset = { offset = 0 },+ onSetTextScale = { scale = it },+ onSetOpacity = { background = (it * 255 / 100) shl 24 },+ )}}rule.onNodeWithText("Provider subtitles").assertIsDisplayed()@@ -77,8 +90,22 @@ class VodTrackSelectionSheetTest {PlayerTrack("he", "Hebrew · Stereo", "he", TrackType.AUDIO, false))rule.setContent {StreamVaultTheme {- VodTrackSelectionSheet(TrackType.AUDIO, audio, 0, 1f, 0, false,- {}, { selected = it }, {}, {}, {}, {}, {}, {})+ VodTrackSelectionSheet(+ trackType = TrackType.AUDIO,+ tracks = audio,+ offsetMs = 0,+ textScale = 1f,+ backgroundColor = 0,+ onlineAvailable = false,+ onDismiss = {},+ onSelectTrack = { selected = it },+ onSearchOnline = {},+ onLoadLocal = {},+ onAdjustOffset = {},+ onResetOffset = {},+ onSetTextScale = {},+ onSetOpacity = {},+ )}}rule.onNodeWithText("English · Stereo").assertIsDisplayed()diff --git a/feature/playback/src/main/java/com/streamvault/feature/playback/player/overlay/PlayerScheduleByTimeDialog.kt b/feature/playback/src/main/java/com/streamvault/feature/playback/player/overlay/PlayerScheduleByTimeDialog.ktindex 0bad62e2..f7312ac8 100644--- a/feature/playback/src/main/java/com/streamvault/feature/playback/player/overlay/PlayerScheduleByTimeDialog.kt+++ b/feature/playback/src/main/java/com/streamvault/feature/playback/player/overlay/PlayerScheduleByTimeDialog.kt@@ -74,7 +74,8 @@ fun PlayerScheduleByTimeDialog(var durationMinutes by remember(now) { mutableIntStateOf(60) }var recurrence by remember(now) { mutableStateOf(RecordingRecurrence.NONE) }- val timeFormat = remember { LocalUiTimeFormat.current.createTimeFormat() }+ val uiTimeFormat = LocalUiTimeFormat.current+ val timeFormat = remember(uiTimeFormat) { uiTimeFormat.createTimeFormat() }val startMs = now + startOffsetMinutes * 60_000Lval endMs = startMs + durationMinutes * 60_000Lval confirmFocusRequester = remember { FocusRequester() }diff --git a/feature/playback/src/test/java/com/streamvault/feature/playback/player/PlayerRecordingCoordinatorTest.kt b/feature/playback/src/test/java/com/streamvault/feature/playback/player/PlayerRecordingCoordinatorTest.ktindex 045eccb0..3482dc1d 100644--- a/feature/playback/src/test/java/com/streamvault/feature/playback/player/PlayerRecordingCoordinatorTest.kt+++ b/feature/playback/src/test/java/com/streamvault/feature/playback/player/PlayerRecordingCoordinatorTest.kt@@ -12,6 +12,7 @@ import com.streamvault.domain.model.RecordingStorageStateimport com.streamvault.domain.model.Resultimport com.streamvault.domain.usecase.ScheduleRecordingimport com.streamvault.domain.usecase.ScheduleRecordingCommand+import com.streamvault.domain.usecase.ScheduleRecordingWindowimport kotlinx.coroutines.flow.Flowimport kotlinx.coroutines.flow.flowOfimport kotlinx.coroutines.test.runTest@@ -24,7 +25,8 @@ class PlayerRecordingCoordinatorTest {val manager = FakeRecordingManager()val coordinator = PlayerRecordingCoordinator(recordingManager = manager,- scheduleRecording = ScheduleRecording(manager)+ scheduleRecording = ScheduleRecording(manager),+ scheduleRecordingWindow = ScheduleRecordingWindow(manager))val result = coordinator.scheduleRecording(diff --git a/feature/settings/src/androidTest/java/com/streamvault/feature/settings/navigation/SettingsRouteGraphBehaviorTest.kt b/feature/settings/src/androidTest/java/com/streamvault/feature/settings/navigation/SettingsRouteGraphBehaviorTest.ktindex 54d18728..f93d15db 100644--- a/feature/settings/src/androidTest/java/com/streamvault/feature/settings/navigation/SettingsRouteGraphBehaviorTest.kt+++ b/feature/settings/src/androidTest/java/com/streamvault/feature/settings/navigation/SettingsRouteGraphBehaviorTest.kt@@ -58,7 +58,7 @@ class SettingsRouteGraphBehaviorTest {actions = NoOpNavigationActions,platformHost = EmptySettingsPlatformHost,navigationDestinations = emptyList(),- settingsContent = { uri, _, _, _ ->+ settingsContent = { uri, _, _, _, _ ->receivedBackupUri = uriandroidx.tv.material3.Text("Settings route")},@@ -91,7 +91,7 @@ class SettingsRouteGraphBehaviorTest {actions = NoOpNavigationActions,platformHost = EmptySettingsPlatformHost,navigationDestinations = emptyList(),- settingsContent = { _, _, _, _ -> androidx.tv.material3.Text("Settings route") },+ settingsContent = { _, _, _, _, _ -> androidx.tv.material3.Text("Settings route") },parentalControlContent = { _, _ -> androidx.tv.material3.Text("Parental route") })}@@ -130,7 +130,7 @@ class SettingsRouteGraphBehaviorTest {actions = NoOpNavigationActions,platformHost = EmptySettingsPlatformHost,navigationDestinations = destinations,- settingsContent = { _, _, _, _ -> androidx.tv.material3.Text("Settings route") },+ settingsContent = { _, _, _, _, _ -> androidx.tv.material3.Text("Settings route") },parentalControlContent = { _, receivedDestinations ->receivedDestinationIds = receivedDestinations.map(UiDestination::id)androidx.tv.material3.Text("Parental route")@@ -162,7 +162,7 @@ class SettingsRouteGraphBehaviorTest {actions = actions,platformHost = EmptySettingsPlatformHost,navigationDestinations = emptyList(),- settingsContent = { _, _, _, _ -> androidx.tv.material3.Text("Settings route") },+ settingsContent = { _, _, _, _, _ -> androidx.tv.material3.Text("Settings route") },parentalControlContent = { onBack, _ ->parentalBack = onBackandroidx.tv.material3.Text("Parental route")