fix(mpd): avoid false no-song warning when stopped

This commit is contained in:
Alexey Ivanov
2026-06-05 08:40:49 -07:00
parent 05945748dc
commit bef7df8f08
+3 -2
View File
@@ -124,8 +124,9 @@ void waybar::modules::MPD::setLabel() {
std::string stateIcon = "";
bool no_song = song_.get() == nullptr;
if (stopped() || no_song) {
if (no_song) spdlog::warn("Bug in mpd: no current song but state is not stopped.");
bool is_stopped = stopped();
if (is_stopped || no_song) {
if (no_song && !is_stopped) spdlog::warn("mpd: no current song while state is not stopped");
format =
config_["format-stopped"].isString() ? config_["format-stopped"].asString() : "stopped";
label_.get_style_context()->add_class("stopped");