diff options
Diffstat (limited to 'src/library/baseexternalplaylistmodel.cpp')
-rw-r--r-- | src/library/baseexternalplaylistmodel.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/library/baseexternalplaylistmodel.cpp b/src/library/baseexternalplaylistmodel.cpp index 7529523896..2ba94fe30b 100644 --- a/src/library/baseexternalplaylistmodel.cpp +++ b/src/library/baseexternalplaylistmodel.cpp @@ -65,6 +65,15 @@ TrackPointer BaseExternalPlaylistModel::getTrack(const QModelIndex& index) const return pTrack; } +TrackId BaseExternalPlaylistModel::getTrackId(const QModelIndex& index) const { + const auto track = getTrack(index); + if (track) { + return track->getId(); + } else { + return TrackId(); + } +} + bool BaseExternalPlaylistModel::isColumnInternal(int column) { if (column == fieldIndex(ColumnCache::COLUMN_PLAYLISTTRACKSTABLE_TRACKID) || (PlayerManager::numPreviewDecks() == 0 && |