This commit is contained in:
Lars Noack 2023-01-30 17:07:26 +01:00
parent bfcec43433
commit 3ddddf2f5f
2 changed files with 8 additions and 0 deletions

View File

@ -147,6 +147,7 @@ class Song(DatabaseObject, SourceAttribute, MetadataAttribute):
if lyrics is not None:
self.lyrics = lyrics
self._album = None
self.album = album
self.main_artist_list = []
@ -214,7 +215,14 @@ class Song(DatabaseObject, SourceAttribute, MetadataAttribute):
metadata.merge_many([l.metadata for l in self.lyrics])
return metadata
def set_album(self, album):
self._album = album
if self not in self._album.tracklist:
self._album.tracklist.append(self)
tracksort_str = property(fget=get_tracksort_str)
album = property(fget=lambda self: self._album, fset=set_album)

BIN
test.db

Binary file not shown.