expand set of album metadata to include everything relevant

This commit is contained in:
Adrian Sampson 2010-07-15 11:22:36 -07:00
parent a69fd39cb5
commit e9e90fa538
2 changed files with 14 additions and 3 deletions

View file

@ -69,10 +69,20 @@ ITEM_KEYS = [f[0] for f in ITEM_FIELDS]
# The third entry in each tuple indicates whether the field reflects an
# identically-named field in the items table.
ALBUM_FIELDS = [
('id', 'integer primary key', False),
('artist', 'text', True),
('album', 'text', True),
('id', 'integer primary key', False),
('artpath', 'text', False),
('artist', 'text', True),
('album', 'text', True),
('genre', 'text', True),
('year', 'int', True),
('month', 'int', True),
('day', 'int', True),
('tracktotal', 'int', True),
('disctotal', 'int', True),
('comp', 'bool', True),
('mb_albumid', 'text', True),
('mb_artistid', 'text', True),
]
ALBUM_KEYS = [f[0] for f in ALBUM_FIELDS]
ALBUM_KEYS_ITEM = [f[0] for f in ALBUM_FIELDS if f[2]]

View file

@ -337,6 +337,7 @@ class AlbumInfoTest(unittest.TestCase):
ai = self.lib.get_album(self.i)
self.assertEqual(ai.artist, self.i.artist)
self.assertEqual(ai.album, self.i.album)
self.assertEqual(ai.year, self.i.year)
def test_albuminfo_stores_art(self):
ai = self.lib.get_album(self.i)