When a track finishes, I tell the library to update playcount. Then,
the library triggers a callback to the playqueue deck telling it to
update.
This patch also finds and prints the track that causes a gstreamer
error.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
- Reimplement binary search for neater code
- Flip sort order when resetting sort if the first field is the one we
are sorting by.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
The history playqueue should never change sort order, so use this flag
to prevent user changes.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I set up a 3-second timeout to decrement the count. When the count is
at 0, I reset sorting on the playlist.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
My test was done with a library size of 8040.
Before this patch, I make 21919628 calls to my "less_than" function.
With this patch, I now make 101205 calls to my "less than" function.
This comes out to a 216-X improvement. I should have done this sooner.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
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>
Start on the collection page. I eventually want to display the first
enable playqueue, though.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
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>