]> git.seodisparate.com - mpd_info_screen/commitdiff
Fix where display doesn't work when no password
authorStephen Seo <seo.disparate@gmail.com>
Tue, 31 Jan 2023 06:57:56 +0000 (15:57 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Tue, 31 Jan 2023 06:57:56 +0000 (15:57 +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 b93226cf2157f284ded0d1b8a75916c1d5dbc428..50646802a9edf331163fa7827a43d674e21c1a06 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,