I don't have user-configurable sorting (yet), but for now I'm sorting by
Artist -> Year -> Track #.
I also fix a bug where the library wasn't lowercasing artist, album,
genere, and track fields when reading from file.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
- Check for path existing in the library already before adding again.
- Iterate over track database using <= for comparison, and not just <
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
For some reason I was only loading the library_db, and ignoring the
others. I fix this, and send out callbacks for each track loaded.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
Gstreamer includes <errno.h>, which already defines several of these
symbols. I rename them to avoid namespace collisions. Perhaps a better
solution would be to use the errno.h definitions directly?
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I was using CONFIG_DEBUG for these, but they really should be under
CONFIG_TEST for use by the testing code ONLY.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This returns a pointer to the library :: Library structure requested.
The gui will use this to display information about each path.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I track the size of each library path for display purposes. I also had
to add in a check for if a new track already exists in the db before
tagging it so updating a library should be much faster now.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
- Combine Artist and Genre struct
- Add in exceptions, rather than boolean returns
- Update the library through idle tasks
I have not implemented importing Ocarina 5.11 libraries yet.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I do not make any of the library spec changes yet, instead I update the
backend code so it compiles and still works with the changes I have made
so far.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I scan the track database and remove files that no longer exist. I
don't yet add in new tracks found in the directories.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
If the id is valid, I fill out a song structure and return true.
If the id is invalid, I return false.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This is each song's track number, play count, and anything else specific
to a single file. After updating, save all the changed databases.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
Passing the TagLib :: Tag pointer is much easier and cuts down on extra
arguments to each constructor.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I don't build up a complete set of databases yet, but I do create the
Artist name database to use later.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
Eventually these functions may have to become idle tasks, but for now I
write to disk whenever the library_db is changed and then read from disk
by calling the init() function.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I can add and remove root-level directories from the library database.
I do not save the database when modified, and I don't yet run an update
on all the files.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>