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:
Cole Helbling
2019-04-20 09:12:30 -07:00
parent d03997bdaa
commit 160837b900
3 changed files with 18 additions and 5 deletions

View File

@ -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);