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>
And clean up how the default playlists are created so the test doesn't
fall over with the new column.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
And create both permanent and temporary maps for tracks. The temporary
map is intended to be used for the New Tracks and Previous playlists,
since we don't store the state across restarts.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I do lookups and inserts based only on the year field. Decades are
created automatically on insert.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I'll eventually need to add a mapping between tracks and their genre
list, but I still need to build up to having Track objects first
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
To represent each disc of an album. Discs may have different subtitles
that we want to display (or there may not be a subtitle at all). Casting
a Disc to a string either appends the subtitle to the album name or
returns the album name directly. This is intended to be used by the
ColumnView to display album names
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
And set the row_factory to use the built-in sqlite3.Row so we can access
columns by name in search results
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>