Show maindisplay's songinfo even if album or artist props are missing.
This commit is contained in:
parent
762d71df38
commit
49d1b6cf9c
1 changed files with 11 additions and 6 deletions
|
@ -126,15 +126,20 @@ void
|
||||||
MainDisplay::setMediainfo (const Xmms::PropDict &info)
|
MainDisplay::setMediainfo (const Xmms::PropDict &info)
|
||||||
{
|
{
|
||||||
QString n;
|
QString n;
|
||||||
if (info.contains ("artist") && info.contains ("album") &&
|
if (info.contains ("title")) {
|
||||||
info.contains ("title")) {
|
if (info.contains ("artist")) {
|
||||||
n = QString::fromUtf8 (info.get<std::string> ("artist").c_str ())
|
n = QString::fromUtf8 (info.get<std::string> ("artist").c_str ()) + " - ";
|
||||||
+ " - " +
|
}
|
||||||
QString::fromUtf8 (info.get<std::string> ("album").c_str ())
|
if (info.contains ("album")) {
|
||||||
+ " - " +
|
n += QString::fromUtf8 (info.get<std::string> ("album").c_str ()) + " - ";
|
||||||
|
}
|
||||||
|
n += QString::fromUtf8 (info.get<std::string> ("title").c_str ());
|
||||||
|
} else if (info.contains ("channel")) {
|
||||||
|
n = QString::fromUtf8 (info.get<std::string> ("channel").c_str ()) + " - " +
|
||||||
QString::fromUtf8 (info.get<std::string> ("title").c_str ());
|
QString::fromUtf8 (info.get<std::string> ("title").c_str ());
|
||||||
} else {
|
} else {
|
||||||
n = QString::fromUtf8 (info.get<std::string> ("url").c_str ());
|
n = QString::fromUtf8 (info.get<std::string> ("url").c_str ());
|
||||||
|
n = n.section ("/", -1);
|
||||||
}
|
}
|
||||||
m_text->setText (n);
|
m_text->setText (n);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue