diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-07-07 15:29:47 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-07-07 15:29:47 +1000 |
| commit | 39f7545cd5ef7a30bbd482f3579df7744c6b688d (patch) | |
| tree | a760a50cc17365fbcd69eb89ca627ad7feb8c0b6 /src/database/include/database.hpp | |
| parent | 2f16d230025c3173cfbecc58b38d6a52b6b0f5f2 (diff) | |
| download | tangara-fw-39f7545cd5ef7a30bbd482f3579df7744c6b688d.tar.gz | |
wire up the playing screen with some real data
Includes implementing song duration calculation for CBR MP3 files
Diffstat (limited to 'src/database/include/database.hpp')
| -rw-r--r-- | src/database/include/database.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/database/include/database.hpp b/src/database/include/database.hpp index 77a17b75..7ffc15b0 100644 --- a/src/database/include/database.hpp +++ b/src/database/include/database.hpp @@ -100,6 +100,15 @@ class Database { auto GetTrackPath(TrackId id) -> std::future<std::optional<std::string>>; + auto GetTrack(TrackId id) -> std::future<std::optional<Track>>; + + /* + * Fetches data for multiple tracks more efficiently than multiple calls to + * GetTrack. + */ + auto GetBulkTracks(std::vector<TrackId> id) + -> std::future<std::vector<std::optional<Track>>>; + auto GetIndexes() -> std::vector<IndexInfo>; auto GetTracksByIndex(const IndexInfo& index, std::size_t page_size) -> std::future<Result<IndexRecord>*>; |
