diff --git a/src/libs/database/impl/TrackList.cpp b/src/libs/database/impl/TrackList.cpp index 5ac4da9d..47fb5a22 100644 --- a/src/libs/database/impl/TrackList.cpp +++ b/src/libs/database/impl/TrackList.cpp @@ -107,6 +107,12 @@ TrackList::getById(Session& session, IdType id) return session.getDboSession().find().where("id = ?").bind(id); } +bool +TrackList::isEmpty() const +{ + return _entries.empty(); +} + std::size_t TrackList::getCount() const { diff --git a/src/libs/database/include/database/TrackList.hpp b/src/libs/database/include/database/TrackList.hpp index a7e2ec02..f05f830b 100644 --- a/src/libs/database/include/database/TrackList.hpp +++ b/src/libs/database/include/database/TrackList.hpp @@ -79,6 +79,7 @@ class TrackList : public Wt::Dbo::Dbo void clear() { _entries.clear(); } // Get tracks, ordered by position + bool isEmpty() const; std::size_t getCount() const; Wt::Dbo::ptr getEntry(std::size_t pos) const; std::vector> getEntries(std::optional offset = {}, std::optional size = {}) const;