From 8c151d1358d4b1bdad8b3f5a3094cad2de28d600 Mon Sep 17 00:00:00 2001 From: Daniel Svensson Date: Wed, 9 Aug 2006 21:02:48 +0200 Subject: [PATCH] Show playlist entries even if album or artist props are missing. --- PlaylistList.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/PlaylistList.cpp b/PlaylistList.cpp index a7fe817..87a575f 100644 --- a/PlaylistList.cpp +++ b/PlaylistList.cpp @@ -215,13 +215,14 @@ PlaylistList::mediainfoChanged (uint id, const Xmms::PropDict &info) PlaylistItem *i = m_itemmap->value (id); if (i) { QString n; - if (info.contains ("artist") && info.contains ("album") && - info.contains ("title")) { - n = QString::fromUtf8 (info.get ("artist").c_str ()) - + " - " + - QString::fromUtf8 (info.get ("album").c_str ()) - + " - " + - QString::fromUtf8 (info.get ("title").c_str ()); + if (info.contains ("title")) { + if (info.contains ("artist")) { + n = QString::fromUtf8 (info.get ("artist").c_str ()) + " - "; + } + if (info.contains ("album")) { + n += QString::fromUtf8 (info.get ("album").c_str ()) + " - "; + } + n += QString::fromUtf8 (info.get ("title").c_str ()); } else if (info.contains ("channel")) { n = QString::fromUtf8 (info.get ("channel").c_str ()) + " - " +