Skip to content

Commit bef7df8

Browse files
committed
fix(mpd): avoid false no-song warning when stopped
1 parent 0594574 commit bef7df8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/modules/mpd/mpd.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,9 @@ void waybar::modules::MPD::setLabel() {
124124
125125
std::string stateIcon = "";
126126
bool no_song = song_.get() == nullptr;
127-
if (stopped() || no_song) {
128-
if (no_song) spdlog::warn("Bug in mpd: no current song but state is not stopped.");
127+
bool is_stopped = stopped();
128+
if (is_stopped || no_song) {
129+
if (no_song && !is_stopped) spdlog::warn("mpd: no current song while state is not stopped");
129130
format =
130131
config_["format-stopped"].isString() ? config_["format-stopped"].asString() : "stopped";
131132
label_.get_style_context()->add_class("stopped");

0 commit comments

Comments
 (0)