This finishes the job I started in the last commit. Once again, I use
an enum of string properties to determine the right field to return.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
Rathen than using a bunch of get_PROPERTY_NAME() functions, I think it's
cleaner to use dictionary-like indexing to access properties. This
patch converts most track access functions, but I haven't gotten around
to strings yet.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
Ocarina no longer has a header file subdirectory so there is no reason
to have a libsaria subdirectory anymore. Putting header files directly
in the include/ directory is a bit simpler.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I'm going to gradually replace the stl list with my own implementation.
This should make everything more efficient and I won't have to deal with
those pesky iterators.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I created a new renderer function for updating tracks when they change.
Using this, I can show the new playcount of tracks as it is incremented.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
Right now, this just toggles the "banned" field in the Track class and
then skips to the next track.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I do this whenever the playlist changes (tracks added, removed or
playlist renumbered). When playlists are deleted I remove the file. I
also remove the file when new_number < cur_number.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
For sets, I keep a sorted list and merge-sort the new songs. I also
created insert_prepare() and insert_done() functions to tell the UI that
we are about to insert (this gives me a chance to call the
freeze_child_notify() and thaw_child_notify() in GTK).
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This also removed the other `typedef sid_t` left in the header file.
I'll re-add in functions and variables as I need them, and hopefully
keep things working more efficiently.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>