Commit Graph

15 Commits

Author SHA1 Message Date
5a52bdc546 db: Give Libraries a way to list their Tracks
And make sure the tracks are deleted when a Library is deleted.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:15:45 -04:00
ea555a428c db: Create a TrackTable and Track object
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:15:44 -04:00
f519830095 db: Create a LibraryTable and Library object
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:15:20 -04:00
63e2e6473d db: Add a function so Decades can list their Years
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:14:58 -04:00
2af61f8787 db: Create a YearTable and Year object
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>
2021-08-23 13:14:56 -04:00
cc65db6d79 db: Create a DecadeTable and Decade object
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:14:31 -04:00
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
00e15c8422 db: Add a function so Albums can list their Discs
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:13:49 -04:00
bbb248f665 db: Create a DiscTable and Disc object
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>
2021-08-23 13:13:48 -04:00
94f08dcd06 db: Give Artists a function for listing their Albums
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:13:25 -04:00
6a1713630b db: Create an AlbumTable and Album tag
Similar to Artists, only holding information about each album instead.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:13:24 -04:00
2d125546dd db: Add an ArtistTable and Artist tag
Also create an index on artist name in the sqlite table for faster
lookups.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:12:56 -04:00
3753b0ad60 db: Add a Tag object
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:12:02 -04:00
2f8e71fff7 db: Add objects for Tables and Rows
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-23 13:12:00 -04:00
2822a9ac35 db: Add initial SQL connection object
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>
2021-08-22 07:33:43 -04:00