Always use name, if set

This commit is contained in:
craig.p.drummond
2013-03-20 20:13:08 +00:00
parent 84459748f9
commit 64a4e4bc0b

View File

@@ -225,14 +225,14 @@ Song MPDParseUtils::parseSong(const QByteArray &data, bool isPlayQueue)
#endif
if (isPlayQueue) {
if (song.title.isEmpty() && !song.file.isEmpty()) {
if (!song.file.isEmpty()) {
if (song.isStream()) {
if (!song.isCantataStream()) {
QString name=getName(song.file);
if (!name.isEmpty()) {
song.name=name;
}
if (song.name.isEmpty()) {
if (song.title.isEmpty() && song.name.isEmpty()) {
song.title=Utils::getFile(QUrl(song.file).path());
}
}