The history and collection playqueues are never saved to disk, so I only
care about saving when a flag is changed.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
Now we are passed the page on the switch_page() signal. This saves time
iterating and comparing.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
When the count is changed or pausing finishes, I trigger this callback
to notify the UI. I also added in a line to enable pausing any time the
count is incremented.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I display the runtime of the currently visible playqueue in the bottom
right of the screen. When the collection manager is visible, I hide
this label.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I almost did this on the gui side, but then I remembered that this isn't
a trivial job. I chose to stick with my rule: "if something can be done
in the backend then it should be done in the backend"
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
Now it says "Collection" to match "Collection Manager" it was either
this or have a "Library" tab and a "Library Manager"
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>
Only available when CONFIG_TESTING is enabled. Used to test clearing
the library and library playqueue for testing.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This prevents an error message (and possible corruption) by continuing
with the open() function even if the file doesn't exist.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This was a bug I discovered when double clicking on paths in the
collection manager to change the path in the FileChooserWidget.
Before this patch, strings could be read as:
<string> /home/anna/Music</string>
Now, the same string will be read as:
<string>/home/anna/Music</string>
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>
I implemented an entire Gtk::TreeModel in this commit, plus some minor
supporting code in the library to look up playlist entries by index.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
The signal connections for these features are really difficult to test
programmatically, but I can test the effects by calling each function
directly.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I had these hidden so the users really, really know that they are
supposed to select directories. Now I've made it easier to browse the
filesystem through the Collection Manager, so hiding files doesn't make
sense.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This allows a user to explore what has been added in each of their
library paths. Right now I filter for directories only, but it may be a
good idea to change this in the future.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I add a little bit of spacing between widgets so they're not so crowded
together. I also adjust things away from the edges of the window
because I tihnk it looks better this way.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This adds support for callbacks telling us when a new library path is
added and when a path has been updated.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>