Commit Graph

14 Commits

Author SHA1 Message Date
Anna Schumaker 853594fc26 db: Remove indexes
They aren't doing anything useful to help speed up sorting, so remove
for now and reevaluate later

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-09 22:05:42 -05:00
Anna Schumaker f6c72ed081 db: Remove the now unused objects.py file
Implements: Issue #18 (Remove the db.objects.Map class)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-27 11:25:02 -04:00
Anna Schumaker bba00b3d27 db: Remove the GenreMap object
We can now do everything it did and more through the Genre playlist
object.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-27 11:25:02 -04:00
Anna Schumaker 8917600970 db: Clear MappedPlaylists before deleting
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>
2021-10-27 11:24:56 -04:00
Anna Schumaker 0688088318 db: Create a MappedPlaylist type
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>
2021-10-18 15:50:07 -04:00
Anna Schumaker 6f9fb34792 db: Give playlists a delete() function
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>
2021-10-16 17:37:23 -04:00
Anna Schumaker 2aad28f708 db: Give Playlists an "icon-name" property
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>
2021-10-15 16:11:34 -04:00
Anna Schumaker 063b93b66f db: Convert the TrackTable into a table.Table
Implements: Issue #11 (Cache database items fields)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-15 16:09:59 -04:00
Anna Schumaker f7907e4142 db: Convert the GenreTable into a playlist.Model
Implements: Issue #11 (Cache database items fields)
Implements: Issue #14 (Convert Tables into Gio.ListModels)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-14 13:22:57 -04:00
Anna Schumaker 84ad195716 db: Convert the PlaylistStateTable into a table.Table
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>
2021-10-14 13:22:57 -04:00
Anna Schumaker 9cf1df7c33 db: Move SQLite Connection stuff into a new file
I find this cleaner than importing from the toplevel module

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-07 13:58:09 -04:00
Anna Schumaker c168fcbda3 db: Give Genres a PlaylistState property
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:18:29 -04:00
Anna Schumaker 5746b2a81f db: Add a GenreMap
For mapping tracks into a list of genres, or a genre into a list of
tracks.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:16:50 -04:00
Anna Schumaker feca3c7a19 db: Create a GenreTable and Genre object
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>
2021-08-23 13:14:09 -04:00