summaryrefslogtreecommitdiffstats
path: root/src/library/banshee/bansheeplaylistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/banshee/bansheeplaylistmodel.cpp')
-rw-r--r--src/library/banshee/bansheeplaylistmodel.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/library/banshee/bansheeplaylistmodel.cpp b/src/library/banshee/bansheeplaylistmodel.cpp
index d42944b38b..8d70427f16 100644
--- a/src/library/banshee/bansheeplaylistmodel.cpp
+++ b/src/library/banshee/bansheeplaylistmodel.cpp
@@ -348,6 +348,15 @@ TrackPointer BansheePlaylistModel::getTrack(const QModelIndex& index) const {
return pTrack;
}
+TrackId BansheePlaylistModel::getTrackId(const QModelIndex& index) const {
+ const auto track = getTrack(index);
+ if (track) {
+ return track->getId();
+ } else {
+ return TrackId();
+ }
+}
+
// Gets the on-disk location of the track at the given location.
QString BansheePlaylistModel::getTrackLocation(const QModelIndex& index) const {
if (!index.isValid()) {