Three unsigned integers is overkill for handling dates.
Implements #65: Date structure can be represented with a single 32bit
value
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Albums tend to have a single genre for all tracks, so it makes more
sense for an album to point to genre information.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
- Define __queue_filter_how_changed() for tests that need queue
callback functions
- Increase column sizes in the view test to make test more reliable
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This is called to check if any string in an artist's token list is
prefixed by the given string.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This is called to check if any string in an album's token list is
prefixed by the given string.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This will be used to replace the current filtering code with a token
comparison for each track.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I set the history playlist to use a noop function, since changing the
history doesn't really make sense.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I'm hitting this problem while developing 6.5, since file formats are
going to change. Let's handle this situation gracefully rather than
segfaulting.
This patch changes versioning problems into fatal errors to prevent us
from overwriting data already on disk.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The pl_artist_init() function is used to allocate a playlist for each
artist already in the database, and pl_artist_deinit() is then used to
free up this memory during cleanup.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
System playlists cannot be created or deleted, so these functions simply
return false in this case. Library playlists will use this to add new
library paths to Ocarina.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I also take the opportunity to add in a generic lookup function to
convert a library path into a playlist.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This function is for both adding and removing tracks, and only returns
false. Tracks will only be added and removed through the update
function.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
The pl_library_init() function is used to allocate a playlist for each
library path already in the database, and pl_library_deinit() is then
used to free this memory during cleanup.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
Similar to the library tag, this is a void pointer that should only be
used by the playlist layer.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I decided to set this as a void pointer to keep other layers from using
the playlist without our knowledge. The only user of this variable
should be the playlist code.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I'm going to use this to distinguish between various playlist types that
are about to be added. Let's update the playlist functions first, and
then add more types in a future patch.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I'll need this to toggle the random flag for the Collection playlist to
avoid cycling through the GUI in order to save.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
It doesn't make sense to have a subdirectory with a single file. Let's
move it back to core/
Implements #45: Move database into core/
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>