Otherwise we end up with a bunch of (playlistid, trackid) pairs in the
map table that don't refer to a valid playlist anymore.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
For finding the number of tracks in the specific playlist.
Implements: Issue #15 (Convert Playlists into Gio.ListModels)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
For genre and most user playlists that rely on an extra map table to
figure out which tracks they have.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Most playlists sort by artist -> album -> year -> discno -> trackno, but
the Previous playlist sorts by rowid with the most recently added
tracks first, and the Up Next playlist sorts by rowid with the most
recently added tracks last.
Implements: Issue #13 (Give most playlists a default sort order)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
So we can remove playlists from the database when needed.
Implemets: Issue #29 (Give playlists a delete() function)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This will be used by the sidebar to display playlist rows
Implements: Issue #20 (Give Playlist database items a icon-name property)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I actually turn it into a playlist.Model, which is a table.Model that
handles playlist states for us.
Implements: Issue #11 (Cache database items fields)
Implements: Issue #14 (Convert Tables into Gio.ListModels)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This gives us access to the new functions and built-in caching. I also
change the PlaylistState object to cache its values rather than querying
the database for everything.
Implements: Issue #11 (Cache database items fields)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
These are the base classes that will be used by all our Playlist-like
objects.
Implements: Issue #11 (Cache database items fields)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This inherites from the Table, but takes a parent instance for some
functions and calculates offsets for items that descend from this
parent.
Implements: Issue #1 (Have SQLite sort our sidebar tables)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This inherits from the Table, but also implements the Gio.ListModel
interface with sorting for use in the sidebar Gtk.ListView
Implements: Issue #1 (Have SQLite sort our sidebar tables)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This is a simlified Table that can be inherited from to implement a
Table-based Gio.ListModel. This gives us the chance to have some tables
that aren't ListModel's, since not everything will need that interface
and unnecessary position-finding slows everything down.
Implements: Issue #8 (Split up db/objects.py)
Implements: Issue #12 (Make database items unique)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
So that we caputere the timestamp that the track finished at. I also
update tha sqlite importer code to account for the possibility of
receiving either a datetime.date or a datetime.datetime
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This is used to query for the next or previous track. The Playlist layer
will implement our playlist stack as one of these objects, and set it on
the Player
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The Gtk.MenuButton doesn't have the same issue with staying "pressed in"
after changing replaygain settings that our custom version does.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I use output-switcher and funnel elements so we can disable the
replaygain plugins by routing the stream around them if necessary.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
By responding to the about-to-finish signal. If it looks like we're
about to pause, then we let the EOS handler handle it instead.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Putting this in the playlist layer was an experiment, but it's easier to
do from the Player now that we've abstracted out all the Gstreamer stuff
into the BassClass
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
It now sets artwork based on the signals sent by the player, allowing us
to move it out of the Player class and create instances based on the
global Player instead.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
For calculating what percentage of a song has been played, which is used
to determine if a track can be marked as played or not
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>