The dbe_index of a given database item might change in the future, so we
can't rely on it everywhere. Let's just use it for saving and loading
files, with the expectation that changes will happen sometime after
startup.
Implements #69: Reduce use of dbe_index in Ocarina code
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>
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>
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>
We now have an interface for controlling everything through struct
db_entry, so let's just have the database store a db_entry directly.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
For allocating new database items from a given key. Tracks do not need
this function since we have special handling for creation and insertion.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
The artist_db should really be controlled from within the Artist tag, so
this patch creates a new tags namespace containing functions that will
find or create tags as they are requested.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
core/tags.cpp was WAY too big, so I moved this code into a new file in
its own directory. I also created a new unit test just for testing the
Artist tag.
This patch disables the "tags" test since it conflicts with the
tests/core/tags/ directory. This is okay because the tagdb is gradually
being phased out!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I created a new directory for tag related code. This keeps the core/
directory cleaner and prevents file name collisions between the library
layer and the library tag.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>