Skip to content

Commit

Permalink
fix build after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Chaphasilor committed Dec 12, 2024
1 parent 122cb0e commit b1c62d4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip
1 change: 0 additions & 1 deletion lib/services/jellyfin_api.chopper.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions lib/services/jellyfin_api_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,8 @@ class JellyfinApiHelper {

/// Removes the current user from the DB and revokes the token on Jellyfin
Future<void> logoutCurrentUser() async {
Response? response;

// We put this in a try-catch loop that basically ignores errors so that the
// user can still log out during scenarios like wrong IP, no internet etc.

Expand All @@ -734,6 +736,14 @@ class JellyfinApiHelper {
"Jellyfin logout failed with error $e. Logging out anyway, but be aware that Jellyfin may have not got the signal.",
e);
} finally {
// If the logout response wasn't successful, warn the user in the logs.
// We continue anyway since this will mostly be for when the client becomes
// unauthorised, which will return 401.
if (response?.isSuccessful == false) {
_jellyfinApiHelperLogger.warning(
"Jellyfin logout returned ${response!.statusCode}. Logging out anyway, but be aware that Jellyfin may still consider this device logged in.");
}

// If we're unauthorised, the logout command will fail but we're already
// basically logged out so we shouldn't fail.
_finampUserHelper.removeUser(_finampUserHelper.currentUser!.id);
Expand Down
6 changes: 3 additions & 3 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,10 @@ packages:
dependency: transitive
description:
name: js
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.7.1"
version: "0.6.7"
json_annotation:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1511,7 +1511,7 @@ packages:
dependency: transitive
description:
name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
url: "https://pub.dev"
source: hosted
version: "1.3.2"
Expand Down

0 comments on commit b1c62d4

Please sign in to comment.