mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Ensure no NULL tags are set
Because `mpd_song_get_tag` from libmpdclient can return NULL, verify the value of tag is valid. Otherwise, set a default string of "N/A". Also adds configuration to specify what this default string should be.
This commit is contained in:
@ -15,6 +15,7 @@ class MPD : public ALabel {
|
||||
|
||||
private:
|
||||
std::thread periodic_updater();
|
||||
std::string getTag(mpd_tag_type type, unsigned idx = 0);
|
||||
void setLabel();
|
||||
std::string getStateIcon();
|
||||
std::string getOptionIcon(std::string optionName, bool activated);
|
||||
|
Reference in New Issue
Block a user