]> git.seodisparate.com - mpd_info_screen/commitdiff
Backport Fix: display not working when no password
authorStephen Seo <seo.disparate@gmail.com>
Sat, 4 Feb 2023 10:40:27 +0000 (19:40 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Sat, 4 Feb 2023 10:40:27 +0000 (19:40 +0900)
Previous implementation only worked if MPD was accessed with a password.
This commit fixes no-password access of MPD.

src/mpd_handler.rs

index 36b26638d8e31e5d5c391e610b0a1fbc1fc5f7fb..0c265b489593211f762abc1afcc4f34286f9dbb6 100644 (file)
@@ -263,10 +263,10 @@ impl MPDHandler {
                 current_binary_size: 0,
                 poll_state: PollState::None,
                 stream,
-                password,
+                password: password.clone(),
                 error_text: String::new(),
                 can_authenticate: true,
-                is_authenticated: false,
+                is_authenticated: password.is_empty(),
                 can_get_album_art: true,
                 can_get_album_art_in_dir: true,
                 can_get_status: true,