From d96e3e514d6243391eb034970c4ecd3f3de137b3 Mon Sep 17 00:00:00 2001 From: Zaidhaan Hussain Date: Mon, 21 Nov 2022 23:05:31 +0800 Subject: [PATCH] Fix MPD blocking when server error occurs by handling directly without blocking further execution by throwing --- src/screens/playlist_editor.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/screens/playlist_editor.cpp b/src/screens/playlist_editor.cpp index 7729fdc3..359fa4b5 100644 --- a/src/screens/playlist_editor.cpp +++ b/src/screens/playlist_editor.cpp @@ -169,10 +169,7 @@ void PlaylistEditor::update() } catch (MPD::ServerError &e) { - if (e.code() == MPD_SERVER_ERROR_SYSTEM) // no playlists directory - Statusbar::print(e.what()); - else - throw; + Status::handleServerError(e); } if (idx < Playlists.size()) Playlists.resizeList(idx);