I query the underlying playlist to see if it is selectable, and then
update the settings file if it is.
Implements #10: Select default playlist
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I need to have integer playlist ids to store into the settings database
once I allow changing the default playlist.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Right now tracks are picked from this playlist whenever possible. A
system for selecting the default playlist will be added shortly.
Implements #20: Only one queue for "Up Next"
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
The settings code is designed to map strings to unsigned integers, which
is exactly what we do here. This lets us cut out an extra file access,
which is always a plus. We remove the audio file after upgrading to
prevent reading it multiple times.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
The playlist code is heavily tested by unit tests for the files in
core/playlists/, so we no longer need to have a separate playlist test.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I initially tried making several helper functions to reuse code and make
it easier to add new playlists. This didn't work all that well, mostly
because glib wasn't able to expand variable values or find the line
number that errors occured on. Macros don't have this problem, since
they are expanded at compile time.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This test can take a long time to run, especially on slow internet
connections. Let's add a way to disable it when testing other things.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This changes test output slightly, in that files are now placed under
subdirectories of $XDG_USER_DATA_DIR/ocarina-test/ instead of in this
directory directly. This should help avoid conflicting files, and lets
me use a single "rm" command to remove everything before testing.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
For using cmake to generate a makefile instead of building through
scons.
Implements issue #3: Investigate CMake
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
Unplayed, Most Played, and Least Played tracks playlists update
themselves with an idle task when tracks have been played. It looks
like we haven't been processing these tasks, so the queue was just
building up after every track. Fix this by enabling the GTK idle
callback whenever a track is played.
Fixes#89: Dynamic playlists aren't updating
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The view is now responsible for allocating the filter, but the gui_queue
still needs to set the filter function during an init step.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>