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>
- 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 added in an update_all() button and combined two identical database
structures. Hopefully this will help to clean up the code.
I also added in wording for how to use the idle queue to scan paths.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I changed the two playlists that are supported, added in exception
handling, and removed the list() function since I will always know the
names of playlists. I also rename everything to "playlist" from
"group".
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This function will convert the provided text to lowercase. This really
isn't a filter function, but the filter already implements a lowercase
cache that should be useful.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I had been returning success / failed boolean values for various
operations. I think it's better to throw an exception in these
"exceptional" circumstances since error values can give more information
about why a function failed.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
- Playlist -> playqueue. Playqueue sounds more temporary, which better
represents how I intend this code to be used.
- Groups -> playlist. A playlist is the accepted term for what I am
trying to create here.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This patch writes out various modifications the GUI will require the
back-end library to make. This includes:
- Rename playlists to playqueues and groups to playlists.
- Make library information accessable.
- Use try/catch style errors instead of returning bool in a few places.
- Extra playqueue accessablity functions.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This matches the current state of the backend library and does not have
any tweaks for the GUI.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
To keep the design readable, I split the playlist class (playlist.txt)
from the playlist deck (deck.txt).
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I made a few modifications to the database, and introduced an
"IndexEntry" database type to do the exact same thing :)
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This function is used in debug mode to print the current status of the
index. I also created a print_keys() function to only list the keys.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
Other tests may need to print out a database. To make this easier I've
added a print() function to the base database class. This function will
only exist when CONFIG.TEST == True, so don't use it outside of testing!
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I was using my own cpp file to remove old test data to start with a
clean slate. I've decided it's easier to just remove the files before
running tests if they exist.
I also use this patch to update the test design and add an idea for the
future.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I still have some back-end work to do first, but I should start thinking
out what users will see.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
- Save recent database changes
- Move the idle queue after the database
- Put file class definition notation
- Update the todo list
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I've been excited about this! I think it'll be a better design than
what I had for Ocarina 5.x.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I need a way to return the progress of the idle queue and to indicate
when it is out of tasks so idle threads can stop running.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
- Inherit from fstream to gain access to << and >> operators.
- Make the file version accessable to the outside world.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
- Support OPEN_READ and OPEN_WRITE
- Update the design to accomidate for error checking
- Add lib/test.cpp containing basic functions that can be used for
testing
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I'm starting to implement file access. I've reread the design and
updated a few things to make it easier to test.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This will give some better stability to the design document, since
entries won't shift around based on python memory locations.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
Each component has its own text file. I merge everything together with
simple dependency resolution so I can figure out implementation order
easier.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This class will manage save files so paths don't need to be resolved in
multiple places. I'll also use it for reading and writing with version
information.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I decided to put the library into a namespace to keep the code clean. I
also added an update algorithm and made minor naming changes.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>