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>
23 lines
474 B
Python
23 lines
474 B
Python
# Copyright 2021 (c) Anna Schumaker.
|
|
import lib
|
|
import sqlite3
|
|
|
|
File = lib.data.emmental_data / "emmental.sqlite3"
|
|
|
|
Connection = sqlite3.connect(File)
|
|
Connection.row_factory = sqlite3.Row
|
|
|
|
commit = Connection.commit
|
|
execute = Connection.execute
|
|
executemany = Connection.executemany
|
|
|
|
from . import artist
|
|
from . import album
|
|
from . import disc
|
|
|
|
def reset():
|
|
mods = [ artist, album, disc ]
|
|
|
|
for mod in mods: mod.Table.drop()
|
|
for mod in mods: mod.Table.do_create()
|