114c22bb12
I changed the two playlists that are supported, added in exception handling, and removed the list() function since I will always know the names of playlists. I also rename everything to "playlist" from "group". Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
54 lines
1.5 KiB
Plaintext
54 lines
1.5 KiB
Plaintext
== Files ==
|
|
ocarina/include/
|
|
playlist.h
|
|
ocarina/lib/
|
|
playlist.cpp
|
|
$HOME/.ocarina{-debug}/
|
|
playlist.db
|
|
|
|
== Depends ==
|
|
database
|
|
|
|
Playlists: (lib/playlist.cpp)
|
|
Playlists are a new feature in Ocarina 6 and are modeled after Gmail
|
|
labels. Ocarina 6.0 will support two different playlists that the
|
|
user can add tracks to: banned and favorites.
|
|
|
|
Future releases will add support for more playlists.
|
|
|
|
- Database:
|
|
Database<database :: IndexEntry> playlist_db
|
|
|
|
- Default playlists:
|
|
Favorites:
|
|
The user will add music they really like to this playlist.
|
|
|
|
Banned:
|
|
The user should add music they do not like to this playlist.
|
|
Tracks should be removed from the Library playqueue when they
|
|
are banned and added back to the playqueue when they are
|
|
un-banned.
|
|
|
|
- API
|
|
void playlist :: init():
|
|
Load the playlist database.
|
|
|
|
void playlist :: add(name, track_id);
|
|
Add the track_id to the playlist named "name". Save the
|
|
database to disk.
|
|
Throw -EEXIST if "name" does not exist.
|
|
|
|
void playlist :: del(name, track_id);
|
|
Remove the track_id from the playlist named "name". Save the
|
|
database to disk. Attempting to remove a track_id that does
|
|
not exist is not an error.
|
|
Throw -EEXIST if "name" does not exist.
|
|
|
|
const std::set<unsigned int> &playlist :: get_tracks(name);
|
|
Return the set of tracks representing the requested group.
|
|
Throw -EEXIST if "name" does not exist.
|
|
|
|
void playlist :: clear();
|
|
This function only exists if CONFIG_TEST is enabled. Clear
|
|
(reset) the playlist database.
|