Commit Graph

14 Commits

Author SHA1 Message Date
Anna Schumaker 1b34a9a8a0 index: Update the index design
I updated the design and rewrote the unit tests.  This creates something
more consistent with how I ended up using the index.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker fc8dc9d55e database: Design and test updates
I add:
- Autosaving option
- Real iterators
- Better accessor functions

The new design and unit test also allows me to remove the 300,000+ line
"database.good" file that the old tests were based on.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker 239c03b1ac playlist: playqueue should not remove tracks
I was double clicking tracks in the gui, and they were removed from the
playqueue!  This patch fixes that.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 21c80ea1f9 lib: Import ban status from Ocarina 5.x
Now that I have a banned playlist working I can remember the ban status
easier.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker a474712a22 lib: Remove track from library pq if banned
Put it back when unbanned.

Signed-off-by: Anna Schumaker <schumaker.ann@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 3894c4ac97 playlist: Create a playqueue to store the current playlist
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 360ebed1fa errors: Rename error codes
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>
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 914473e10a Rename playlist and group source files
Playlist -> playqueue
Group -> playlist

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:57 -04:00
Anna Schumaker b8b215be35 deck: Save and restore the playlist deck
The read and write functions will be called by a higher up layer, so I
need to open the file manually in the test.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:56 -04:00
Anna Schumaker 0c01751946 playlist: Implement next()
Random and sequential next, for both locked and unlocked playlists.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:56 -04:00
Anna Schumaker 168f08392d playlist: Implement read() and write()
The file will be passed in by the deck layer, since it stores multiple
files.  I just fake up a file in test_2() that is used for storing the
playlist.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:56 -04:00
Anna Schumaker 3a478ddba7 playlist: Implement playlist modification functions
I can now add and remove tracks, in addition to asking for the playlist
size.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:56 -04:00
Anna Schumaker 2d13b74c12 playlist: Create the initial playlist class
Right now it just knows the value of its flags variable.  More to come
soon!

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:56 -04:00