fix: mpd bug paused with no song.
This commit is contained in:
parent
b34d325a71
commit
3c96881a59
|
@ -122,7 +122,10 @@ void waybar::modules::MPD::setLabel() {
|
||||||
std::chrono::seconds elapsedTime, totalTime;
|
std::chrono::seconds elapsedTime, totalTime;
|
||||||
|
|
||||||
std::string stateIcon = "";
|
std::string stateIcon = "";
|
||||||
if (stopped()) {
|
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.");
|
||||||
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");
|
||||||
|
|
Loading…
Reference in New Issue