From 006f3f8efd963ed661b6eccb3aa371ef6c11a367 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Tue, 21 Jun 2016 04:38:14 +0200 Subject: [PATCH] fix(mpd): Default tag values --- src/modules/mpd.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/mpd.cpp b/src/modules/mpd.cpp index 3699d4ab..edda7fad 100644 --- a/src/modules/mpd.cpp +++ b/src/modules/mpd.cpp @@ -188,9 +188,9 @@ bool MpdModule::update() if (this->label_song) { this->label_song_tokenized->text = this->label_song->text; - this->label_song_tokenized->replace_token("%artist%", artist); - this->label_song_tokenized->replace_token("%album%", album); - this->label_song_tokenized->replace_token("%title%", title); + this->label_song_tokenized->replace_token("%artist%", !artist.empty() ? artist : "untitled artist"); + this->label_song_tokenized->replace_token("%album%", !album.empty() ? album : "untitled album"); + this->label_song_tokenized->replace_token("%title%", !title.empty() ? title : "untitled track"); } if (this->label_time) {