Skip to content

StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.

Merge Jellyfin support and follow-up fixes

David Nashashd4fa171dc2d0
diff --cc app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupScreen.kt
index 0abe1590,e9c7dcb5..6079bd7f
--- a/app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupScreen.kt
+++ b/app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupScreen.kt
@@@ -80,10 -80,9 +83,13 @@@ import com.streamvault.app.ui.interacti
import com.streamvault.app.ui.components.shell.StatusPill
import com.streamvault.app.ui.screens.settings.BackupImportPreviewDialog
import com.streamvault.app.ui.theme.*
+import com.streamvault.data.remote.stalker.StalkerAdvancedOptions
+import com.streamvault.data.remote.stalker.StalkerAdvancedOptionsCodec
+import com.streamvault.data.remote.stalker.StalkerParamOverride
+import com.streamvault.data.remote.stalker.StalkerRequestRule
+ import com.google.zxing.qrcode.QRCodeWriter
+ import com.google.zxing.BarcodeFormat
+ import android.graphics.Bitmap
import com.streamvault.data.util.ProviderInputSanitizer
import com.streamvault.domain.model.ProviderEpgSyncMode
import com.streamvault.domain.model.ProviderXtreamLiveSyncMode
@@@ -98,37 -97,8 +106,37 @@@ import kotlin.coroutines.resum
// ??? Source type ?????????????????????????????????????????????????????????????
- private enum class SourceType { XTREAM, STALKER, M3U_URL, M3U_FILE }
+ private enum class SourceType { XTREAM, STALKER, M3U_URL, M3U_FILE, JELLYFIN }
+private data class StalkerRequestRuleUiState(
+ val action: String = "",
+ val blockRequest: Boolean = false,
+ val paramsText: String = ""
+)
+
+private fun StalkerRequestRuleUiState.toRule(): StalkerRequestRule =
+ StalkerRequestRule(
+ action = action.trim(),
+ blockRequest = blockRequest,
+ paramOverrides = paramsText
+ .split('|', '\n')
+ .mapNotNull { entry ->
+ val trimmed = entry.trim()
+ if (trimmed.isBlank()) return@mapNotNull null
+ val separator = trimmed.indexOf('=').takeIf { it >= 0 } ?: trimmed.indexOf(':')
+ val name = if (separator >= 0) trimmed.substring(0, separator).trim() else trimmed
+ val value = if (separator >= 0) trimmed.substring(separator + 1).trim() else ""
+ name.takeIf { it.isNotBlank() }?.let { StalkerParamOverride(it, value) }
+ }
+ )
+
+private fun StalkerRequestRule.toUiState(): StalkerRequestRuleUiState =
+ StalkerRequestRuleUiState(
+ action = action,
+ blockRequest = blockRequest,
+ paramsText = paramOverrides.joinToString(" | ") { "${it.name}=${it.value}" }
+ )
+
// ??? Screen ??????????????????????????????????????????????????????????????????
@OptIn(ExperimentalLayoutApi::class)
@@@ -164,14 -134,7 +172,15 @@@ fun ProviderSetupScreen
var stalkerDeviceId by rememberSaveable { mutableStateOf("") }
var stalkerDeviceId2 by rememberSaveable { mutableStateOf("") }
var stalkerSignature by rememberSaveable { mutableStateOf("") }
+ var stalkerHwVersion by rememberSaveable { mutableStateOf("") }
+ var stalkerApiUserAgent by rememberSaveable { mutableStateOf("") }
+ var stalkerPlayerUserAgent by rememberSaveable { mutableStateOf("") }
+ var stalkerXUserAgentLink by rememberSaveable { mutableStateOf(StalkerAdvancedOptions.LINK_ETHERNET) }
+ var stalkerProxyEnabled by rememberSaveable { mutableStateOf(false) }
+ var stalkerProxyHost by rememberSaveable { mutableStateOf("") }
+ var stalkerProxyPort by rememberSaveable { mutableStateOf("") }
+ val stalkerRequestRules = remember { mutableStateListOf<StalkerRequestRuleUiState>() }
+ var jellyfinQuickConnectCode by rememberSaveable { mutableStateOf("") }
var fileImportError by rememberSaveable { mutableStateOf<String?>(null) }
var handledInitialImportUri by rememberSaveable { mutableStateOf<String?>(null) }
var showDiscardDraftDialog by rememberSaveable { mutableStateOf(false) }
@@@ -453,8 -372,11 +467,11 @@@
fileImportError = fileImportError,
onFilePick = { filePickerLauncher.launch(arrayOf("*/*")) },
onLoginXtream = { viewModel.loginXtream(serverUrl, username, password, name, httpUserAgent, httpHeaders) },
- onLoginStalker = { viewModel.loginStalker(serverUrl, stalkerMacAddress, stalkerAuthMode, username, password, name, stalkerDeviceProfile, stalkerDeviceTimezone, stalkerDeviceLocale, stalkerSerialNumber, stalkerDeviceId, stalkerDeviceId2, stalkerSignature) },
+ onLoginStalker = { viewModel.loginStalker(serverUrl, stalkerMacAddress, stalkerAuthMode, username, password, name, "", httpHeaders, stalkerDeviceProfile, stalkerDeviceTimezone, stalkerDeviceLocale, stalkerSerialNumber, stalkerDeviceId, stalkerDeviceId2, stalkerSignature, buildStalkerAdvancedOptionsJson()) },
onAddM3u = { viewModel.addM3u(m3uUrl, name, httpUserAgent, httpHeaders) },
+ onLoginJellyfin = { viewModel.loginJellyfin(serverUrl, username, password, name) },
+ quickConnectCode = uiState.jellyfinQuickConnectCode,
+ onQuickConnectRequest = { viewModel.loginJellyfinQuickConnect(serverUrl.trim(), name.trim()) },
onStartPhonePairing = viewModel::startPhonePairing,
onStopPhonePairing = viewModel::stopPhonePairing,
onToggleM3uVodClassification = { viewModel.updateM3uVodClassificationEnabled(!uiState.m3uVodClassificationEnabled) },
@@@ -508,8 -419,11 +525,11 @@@
fileImportError = fileImportError,
onFilePick = { filePickerLauncher.launch(arrayOf("*/*")) },
onLoginXtream = { viewModel.loginXtream(serverUrl, username, password, name, httpUserAgent, httpHeaders) },
- onLoginStalker = { viewModel.loginStalker(serverUrl, stalkerMacAddress, stalkerAuthMode, username, password, name, stalkerDeviceProfile, stalkerDeviceTimezone, stalkerDeviceLocale, stalkerSerialNumber, stalkerDeviceId, stalkerDeviceId2, stalkerSignature) },
+ onLoginStalker = { viewModel.loginStalker(serverUrl, stalkerMacAddress, stalkerAuthMode, username, password, name, "", httpHeaders, stalkerDeviceProfile, stalkerDeviceTimezone, stalkerDeviceLocale, stalkerSerialNumber, stalkerDeviceId, stalkerDeviceId2, stalkerSignature, buildStalkerAdvancedOptionsJson()) },
onAddM3u = { viewModel.addM3u(m3uUrl, name, httpUserAgent, httpHeaders) },
+ onLoginJellyfin = { viewModel.loginJellyfin(serverUrl, username, password, name) },
+ quickConnectCode = uiState.jellyfinQuickConnectCode,
+ onQuickConnectRequest = { viewModel.loginJellyfinQuickConnect(serverUrl.trim(), name.trim()) },
onStartPhonePairing = viewModel::startPhonePairing,
onStopPhonePairing = viewModel::stopPhonePairing,
onToggleM3uVodClassification = { viewModel.updateM3uVodClassificationEnabled(!uiState.m3uVodClassificationEnabled) },
diff --cc app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupViewModel.kt
index 30314b13,1682c762..cde7dcdb
--- a/app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupViewModel.kt
+++ b/app/src/main/java/com/streamvault/app/ui/screens/provider/ProviderSetupViewModel.kt
@@@ -866,7 -1058,7 +1065,8 @@@ data class ProviderSetupState
val stalkerDeviceId: String = "",
val stalkerDeviceId2: String = "",
val stalkerSignature: String = "",
+ val stalkerAdvancedOptionsJson: String = "",
+ val jellyfinQuickConnectCode: String = "",
val createdProviderId: Long? = null,
val createdProviderName: String? = null,
val pendingCombinedAttachProfileId: Long? = null,
diff --cc data/src/test/java/com/streamvault/data/sync/SyncManagerTest.kt
index 7c2845e6,6c81e4ec..73810ec8
--- a/data/src/test/java/com/streamvault/data/sync/SyncManagerTest.kt
+++ b/data/src/test/java/com/streamvault/data/sync/SyncManagerTest.kt
@@@ -46,9 -47,7 +47,10 @@@ import com.streamvault.data.remote.stal
import com.streamvault.data.remote.stalker.StalkerProviderProfile
import com.streamvault.data.remote.stalker.StalkerSession
import com.streamvault.data.remote.stalker.StalkerApiService
+import com.streamvault.data.remote.stalker.StalkerAdvancedOptions
+import com.streamvault.data.remote.stalker.StalkerAdvancedOptionsCodec
+import com.streamvault.data.remote.stalker.StalkerDeviceProfile
+ import com.streamvault.data.remote.jellyfin.JellyfinProvider
import com.streamvault.data.preferences.PreferencesRepository
import com.streamvault.domain.model.ContentType
import kotlinx.coroutines.CompletableDeferred
diff --cc docs/CHANGELOG.md
index fd006307,a21f8457..7cc26621
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@@ -4,37 -4,15 +4,41 @@@ All notable product changes are recorde
## [1.0.15] - 2026-06-13
+### Fixed
+
+- Fixed Stalker endpoint handling so authenticated requests stay on the discovered API endpoint instead of retrying the sibling `portal.php` or `server/load.php` path automatically.
+- Fixed Stalker request and playback cookies to only send the required `mac`, `stb_lang`, and `timezone` client values, with encoded cookie formatting and no extra device-identity cookies.
+- Fixed Stalker device-profile generation so empty Serial Number, Device ID, Device ID2, and Signature fields stay empty instead of being auto-generated.
+- Fixed Stalker profile metrics so `uid` uses Device ID2, and removed `video_out` and `signature` from the generated metrics payload.
+- Fixed Stalker profile requests to send `prehash=false` literally instead of numeric `0`/`1` values.
+- Fixed the default Stalker `get_profile` version string to use the legacy MAG 250 `5.6.10` profile value expected by stricter portals.
+- Fixed Stalker and Xtream setup overrides so saved User-Agent, custom headers, and Stalker advanced compatibility settings are respected across login, sync, playback resolution, and VOD/series detail requests.
+- Fixed Stalker HTTP proxy playback support so proxy metadata is preserved through resolved streams and also used by Android TV Input playback.
+- Fixed Live TV favorites, recents, and custom-group ordered lists still collapsing SD/HD/FHD channel variants after grouped variants were disabled.
++- Fixed Jellyfin playback and artwork authentication so provider credentials are applied at request time instead of being embedded into stored poster, backdrop, or cover URLs.
++- Fixed Jellyfin sync diagnostics to avoid logging token-derived credential data.
+
### Added
+- Added Stalker advanced HTTP header overrides, including support for custom headers and removing default request/playback headers by leaving an override value blank.
+- Added Stalker-specific SSL bypass handling for portal requests and player playback so invalid HTTPS certificates no longer block those connections.
+- Added Stalker advanced compatibility options for hw_version, separate API/player User-Agent values, Ethernet/WiFi X-User-Agent link type, HTTP proxy support for API and playback, and action-scoped request blocking/parameter overrides.
+ - Added Jellyfin provider support for direct Movies and Series library sync, playback, and provider setup from the main onboarding flow.
+ - Added Jellyfin Quick Connect onboarding with on-screen code and QR flow for signing into compatible servers without typing a password on TV.
+### Changed
+
+- Changed the Stalker `Device profile` field label in setup to `MAG Type` while keeping the same underlying saved value and behavior.
+
+## [1.0.14] - 2026-06-06
+
+### Added
+
+- DB migration from 1.0.12
+
### Fixed
-- Fixed Jellyfin playback and artwork authentication so provider credentials are applied at request time instead of being embedded into stored poster, backdrop, or cover URLs.
-- Fixed Jellyfin sync diagnostics to avoid logging token-derived credential data.
+- Login does nothing issue.
## [1.0.13] - 2026-06-06
@@@ -52,18 -30,18 +56,6 @@@
### Changed
- Changed VOD downloads to use a single FIFO provider-stream scheduler with fresh provider URL resolution before each capture attempt.
--- Changed provider playback/download coordination so provider-backed internal or external playback pauses active downloads, deletes partial output, and restarts from zero after playback ends.
--- Changed the live player EPG flow so a second right-press can expand the channel EPG into the full transparent guide grid, with an on-screen directional cue and overlay-specific grid navigation.
--
--### Fixed
--
--- Attempted to fix Android TV backup export/import creating empty backup JSON or showing version `0` with `0` items on restore. Needs testing.
--- Fixed the Settings crash report viewer so the latest crash content can scroll with the TV D-pad.
--- Fixed provider delete confirmation staying open when a follow-up TV integration refresh failed after the provider had already been deleted.
--- 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 Xtream provider connection-limit parsing so placeholder values like `0`, empty, and `N/A` fall back safely instead of producing invalid limits.
--- Fixed Xtream and Stalker onboarding/sync so VOD-only providers are not treated as failed when Live TV is empty, and Movies/Series loading still continues.
- 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.
diff --cc domain/src/main/java/com/streamvault/domain/manager/ProviderSetupInputValidator.kt
index a5f5c95b,5e395065..15b70e2b
--- a/domain/src/main/java/com/streamvault/domain/manager/ProviderSetupInputValidator.kt
+++ b/domain/src/main/java/com/streamvault/domain/manager/ProviderSetupInputValidator.kt
@@@ -34,10 -32,21 +34,22 @@@ data class ValidatedStalkerProviderInpu
val serialNumber: String = "",
val deviceId: String = "",
val deviceId2: String = "",
- val signature: String = ""
+ val signature: String = "",
+ val stalkerAdvancedOptionsJson: String = ""
)
+ data class ValidatedJellyfinProviderInput(
+ val serverUrl: String,
+ val username: String,
+ val password: String,
+ val name: String
+ )
+
+ data class ValidatedJellyfinQuickConnectProviderInput(
+ val serverUrl: String,
+ val name: String
+ )
+
interface ProviderSetupInputValidator {
fun validateXtream(
serverUrl: String,
@@@ -72,7 -79,19 +84,20 @@@
serialNumber: String = "",
deviceId: String = "",
deviceId2: String = "",
- signature: String = ""
+ signature: String = "",
+ stalkerAdvancedOptionsJson: String = ""
): Result<ValidatedStalkerProviderInput>
+
+ fun validateJellyfin(
+ serverUrl: String,
+ username: String,
+ password: String,
+ name: String,
+ allowBlankPassword: Boolean = false
+ ): Result<ValidatedJellyfinProviderInput>
+
+ fun validateJellyfinQuickConnect(
+ serverUrl: String,
+ name: String
+ ): Result<ValidatedJellyfinQuickConnectProviderInput>
}
diff --cc domain/src/test/java/com/streamvault/domain/usecase/ValidateAndAddProviderTest.kt
index d87ea2f0,8ae0fd90..3aa9e62f
--- a/domain/src/test/java/com/streamvault/domain/usecase/ValidateAndAddProviderTest.kt
+++ b/domain/src/test/java/com/streamvault/domain/usecase/ValidateAndAddProviderTest.kt
@@@ -549,9 -555,21 +565,22 @@@ private class FakeProviderSetupInputVal
serialNumber: String,
deviceId: String,
deviceId2: String,
- signature: String
+ signature: String,
+ stalkerAdvancedOptionsJson: String
): Result<ValidatedStalkerProviderInput> = stalkerResult
+
+ override fun validateJellyfin(
+ serverUrl: String,
+ username: String,
+ password: String,
+ name: String,
+ allowBlankPassword: Boolean
+ ): Result<ValidatedJellyfinProviderInput> = jellyfinResult
+
+ override fun validateJellyfinQuickConnect(
+ serverUrl: String,
+ name: String
+ ): Result<ValidatedJellyfinQuickConnectProviderInput> = jellyfinQuickConnectResult
}
private data class XtreamCall(