Commit Graph

52 Commits

Author SHA1 Message Date
Anna Schumaker bd2aaf73d1 audio: Updates for spec changes
This is mostly to add in checks for try / catch style error handling.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:57 -04:00
Anna Schumaker 1d559865c8 deck: Updates for the playlist -> playqueue renaming
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:57 -04:00
Anna Schumaker e889ca538f playqueue: Implement length tracking
I use this to know the running time of the playqueue, which will be
displayed on the GUI.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:57 -04:00
Anna Schumaker 5dd5ec6db0 library: Add a lookup_path() function
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>
2014-04-06 19:56:57 -04:00
Anna Schumaker 371b988dac library: Various updates
- 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>
2014-04-06 19:56:57 -04:00
Anna Schumaker e484653d71 design: Draft out library changes
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>
2014-04-06 19:56:57 -04:00
Anna Schumaker 114c22bb12 playlist: Implement reachitecting of playlists
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>
2014-04-06 19:56:57 -04:00
Anna Schumaker ee100c0238 filter: Implement a "to lowercase" function
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>
2014-04-06 19:56:57 -04:00
Anna Schumaker acd8bd7b23 database: Implement updates to match my current design
- Force the primary key to be a string
- Throw error codes rather than 0

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:57 -04:00
Anna Schumaker ab8c15ecb7 file: Implement minor design changes
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>
2014-04-06 19:56:57 -04:00
Anna Schumaker 0760b1fecd design: Add information about testing library importing
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:57 -04:00
Anna Schumaker f7a7710482 design: Rename a few subsystems
- 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>
2014-04-06 19:56:57 -04:00
Anna Schumaker 31e6bcef3b design: Modifications needed by the GUI
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>
2014-04-06 19:56:57 -04:00
Anna Schumaker e1d527f077 design: Update design.txt
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>
2014-04-06 19:56:57 -04:00
Anna Schumaker 9aa2bc7df1 design: Split playlist design
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>
2014-04-06 19:56:56 -04:00
Anna Schumaker c2bc99ad9b design: Design out the index class
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>
2014-04-06 19:56:56 -04:00
Anna Schumaker 0d84f92d2a design: Fix up formatting
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:54 -04:00
Anna Schumaker 629cbeb2e9 index: Add a print() function
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>
2014-04-06 19:56:54 -04:00
Anna Schumaker 79d592ed64 database: Add a function for printing
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>
2014-04-06 19:56:54 -04:00
Anna Schumaker 9880e98d0d tests: Improve removing old test data
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>
2014-04-06 19:56:54 -04:00
Anna Schumaker 6a29066ac7 Update design.txt
To include changes to:
- Idle queue
- Library
- Playlist

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:53 -04:00
Anna Schumaker f7d95707d6 design: Update design.txt
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:53 -04:00
Anna Schumaker c72ffeb9b9 design: Start thinking about the GUI
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>
2014-04-06 19:56:53 -04:00
Anna Schumaker 54f9263170 design: Update design.txt
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:53 -04:00
Anna Schumaker 8ef1e2f8e6 design: Update design
- 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>
2014-04-06 19:56:52 -04:00
Anna Schumaker f7a3eec35c file: Do not open files with an empty filepath
Instead mark them as invalid to keep from opening a directory instead of
a file.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:52 -04:00
Anna Schumaker fee08b1f94 database: Begin database code
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>
2014-04-06 19:56:52 -04:00
Anna Schumaker 857598dea7 design: Revisit the database design
Update the style and make sure everything still makes sense when reading
it.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:52 -04:00
Anna Schumaker 1cfd9588f9 design: Update idle queue design
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>
2014-04-06 19:56:52 -04:00
Bryan Schumaker b248300d01 design: Move audio section
I want it listed last so I can select songs from a library or playlist
to play.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:52 -04:00
Bryan Schumaker a190047648 design: Add unit test library documentation
This will make it easier to keep track of what functions are available.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:52 -04:00
Bryan Schumaker 328c6f70e8 file: Implement reading and writing
- 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>
2014-04-06 19:56:52 -04:00
Bryan Schumaker ecd56831f6 file: Open and close files
- 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>
2014-04-06 19:56:52 -04:00
Bryan Schumaker 307bc88cb6 design: Update file design
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>
2014-04-06 19:56:52 -04:00
Bryan Schumaker 72c7261ac8 design: Sort potential nodes by name
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>
2014-04-06 19:56:52 -04:00
Bryan Schumaker e13b4afa60 design: Break doc into pieces
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>
2014-04-06 19:56:51 -04:00
Bryan Schumaker cf7f1f726f build: Rename config variables
I'm giving them a CONFIG_ prefix.  I also made version.h a real file
that uses a config variable.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker d8c8ea1bbf Design: Put in idle queue information
This is needed for scheduling files to load later.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 04d4aca772 Design: Add version and printing info
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 0b2fc03f19 design: Rework playlists, add filtering
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker b786b44a49 design: Add in gstreamer thoughts
Because a music player should be able to play music :)

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 310c9ad395 Design: Create a preferences namespace
This will be used to store various values for the user.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 5312853b86 Design: Create a File class
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>
2014-04-06 19:56:51 -04:00
Bryan Schumaker fc40a9f77f Design: Update groups
Groups now use an index to manage their data.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 5a7fcdb305 Design: Create an index class
This will be used for groups, both stored and temporary.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 08b0513578 Improve on file format text
I think it's cleaner now.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 59f08cfc51 Design: Update library information
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>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 2ea1ea8d26 Database design
I've decided to make my own "database" tailored for things I need to do.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 80e00dd914 Design: Rethink groups and add in future ideas
I renamed "tags" to "groups" to avoid confusion with ID3 tags.  I also
thought out a better plan for eventually implementing user defined tags
so that I can build up to them with testing along the way.  With any
luck, I won't overwhelm myself with features =).

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00
Bryan Schumaker 2b145f2dab Update design
I remembered that I don't like SQL, so managing my own library database
is probably better.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2014-04-06 19:56:51 -04:00