summaryrefslogtreecommitdiffstats
path: root/app/playlistwithmetadata.cpp
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-03-10 11:49:11 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-03-11 17:08:56 -0800
commit05463821cd9dfb2c56a56566a4992540ad1e83b2 (patch)
treea66df02812284c67e94ddd6cce7f18afb313a1ae /app/playlistwithmetadata.cpp
parentb6fd2f54b570fd98ad8a716e886d7d35d132465c (diff)
playlistwithmetadata: default to filename with no title mediadata
Some multimedia files do not have title metadata so default to the short filename of the media. Change-Id: I45949085c038eddb648e483942fd7aa21b64eae4 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'app/playlistwithmetadata.cpp')
-rw-r--r--app/playlistwithmetadata.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/playlistwithmetadata.cpp b/app/playlistwithmetadata.cpp
index be6d9a1..28bd0b2 100644
--- a/app/playlistwithmetadata.cpp
+++ b/app/playlistwithmetadata.cpp
@@ -160,6 +160,8 @@ QVariant PlaylistWithMetadata::data(const QModelIndex &index, int role) const
switch (role) {
case TitleRole:
ret = d->title.value(url);
+ if (ret.toString().isEmpty())
+ ret = QVariant(url.fileName());
break;
case ArtistRole:
ret = d->artist.value(url);