Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent usage of Jellyfin 10.9 to prevent crashes due to incompatibility #3309

Closed
wants to merge 1 commit into from

Conversation

nielsvanvelzen
Copy link
Member

We already have a minimum supported server version, this PR adds a minimum unsupported version (the first version we know doesn't work). Right now the app and 10.9 are incompatible. Depending on how many issue reports are going to come in I'll decide if we really need this or not (in which case the PR will suddenly be gone)

Changes

  • Block login when server is using a version too new and marked as unsupported (currently set to >=10.9)
  • Added additional documentation to the versions specified

Issues

@nielsvanvelzen nielsvanvelzen added the enhancement New feature or request label Jan 12, 2024
@@ -465,6 +465,7 @@
<string name="live_tv_preferences">Live TV options</string>
<string name="app_notification_uimode_invalid">This app is optimized for televisions. We recommend using our mobile app on other devices.</string>
<string name="server_unsupported_notification">This server uses Jellyfin version %1$s which is unsupported. Please update to Jellyfin %2$s or newer to continue using the app.</string>
<string name="server_unsupported_notification_downgrade">This server uses Jellyfin version %1$s which is unsupported. Please downgrade to Jellyfin %2$s to continue using the app.</string>

Check warning

Code scanning / Android Lint

Unused resources Warning

The resource R.string.server_unsupported_notification_downgrade appears to be unused
val versionSupported = serverVersion != null && serverVersion >= ServerRepository.minimumServerVersion

val versionTooOld = serverVersion == null || serverVersion < ServerRepository.minimumServerVersion
val versionTooNew = serverVersion != null && ServerRepository.minimumUnsupportedServerVersion != null && serverVersion >= ServerRepository.minimumUnsupportedServerVersion

Check warning

Code scanning / detekt

Line detected, which is longer than the defined maximum line length in the code style. Warning

Line detected, which is longer than the defined maximum line length in the code style.
@@ -63,7 +63,7 @@
userLoginViewModel.loginState.onEach { state ->
when (state) {
is ServerVersionNotSupported -> binding.error.setText(getString(
R.string.server_issue_outdated_version,
if (state.server.versionTooNew) R.string.server_issue_unsupported_version else R.string.server_issue_outdated_version,

Check warning

Code scanning / detekt

Line detected, which is longer than the defined maximum line length in the code style. Warning

Line detected, which is longer than the defined maximum line length in the code style.
@@ -70,7 +70,7 @@
userLoginViewModel.loginState.onEach { state ->
when (state) {
is ServerVersionNotSupported -> binding.error.setText(getString(
R.string.server_issue_outdated_version,
if (state.server.versionTooNew) R.string.server_issue_unsupported_version else R.string.server_issue_outdated_version,

Check warning

Code scanning / detekt

Line detected, which is longer than the defined maximum line length in the code style. Warning

Line detected, which is longer than the defined maximum line length in the code style.
@nielsvanvelzen
Copy link
Member Author

Closing as I don't see much use for this anymore. It would also require us to keep bumping the unsupported version periodically so it doesn't create false-positives and I'm sure I'm going to forget.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant