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
|
@ -114,13 +114,22 @@ bool CMpdClient::GetCurrentSong()
|
||||||
|
|
||||||
if (line == "OK")
|
if (line == "OK")
|
||||||
{
|
{
|
||||||
if (artist.empty())
|
string songtext;
|
||||||
artist = "Unknown artist";
|
if (artist.empty() && title.empty())
|
||||||
|
{
|
||||||
|
songtext = "Wat? No title?";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (artist.empty())
|
||||||
|
artist = "Unknown artist";
|
||||||
|
if (title.empty())
|
||||||
|
title = "Unknown title";
|
||||||
|
|
||||||
if (title.empty())
|
songtext = artist + " - " + title;
|
||||||
title = "Unknown title";
|
}
|
||||||
|
|
||||||
SetCurrentSong(artist + " - " + title);
|
SetCurrentSong(songtext);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue