added: display text when song has no artist and title
This commit is contained in:
parent
b3effd71a6
commit
402137ac25
1 changed files with 14 additions and 5 deletions
|
@ -113,14 +113,23 @@ bool CMpdClient::GetCurrentSong()
|
|||
}
|
||||
|
||||
if (line == "OK")
|
||||
{
|
||||
string songtext;
|
||||
if (artist.empty() && title.empty())
|
||||
{
|
||||
songtext = "Wat? No title?";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (artist.empty())
|
||||
artist = "Unknown artist";
|
||||
|
||||
if (title.empty())
|
||||
title = "Unknown title";
|
||||
|
||||
SetCurrentSong(artist + " - " + title);
|
||||
songtext = artist + " - " + title;
|
||||
}
|
||||
|
||||
SetCurrentSong(songtext);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue