Merge pull request #5101 from SaveTheRbtz/codex-mpd-song-warning

fix(mpd): avoid false no-song warning when stopped
This commit is contained in:
Alexis Rouillard
2026-07-03 19:52:58 +02:00
committed by GitHub
+3 -2
View File
@@ -124,8 +124,9 @@ void waybar::modules::MPD::setLabel() {
std::string stateIcon = ""; std::string stateIcon = "";
bool no_song = song_.get() == nullptr; bool no_song = song_.get() == nullptr;
if (stopped() || no_song) { bool is_stopped = stopped();
if (no_song) spdlog::warn("Bug in mpd: no current song but state is not stopped."); if (is_stopped || no_song) {
if (no_song && !is_stopped) spdlog::warn("mpd: no current song while state is not stopped");
format = format =
config_["format-stopped"].isString() ? config_["format-stopped"].asString() : "stopped"; config_["format-stopped"].isString() ? config_["format-stopped"].asString() : "stopped";
label_.get_style_context()->add_class("stopped"); label_.get_style_context()->add_class("stopped");