refactored and cleaned up data objects
This commit is contained in:
@@ -196,7 +196,7 @@ class Database:
|
||||
|
||||
for song in album.tracklist:
|
||||
self.push_song(song, pushed=pushed)
|
||||
for artist in album.artists:
|
||||
for artist in album.artist_collection:
|
||||
self.push_artist_album(artist_ref=artist.reference, album_ref=album.reference)
|
||||
self.push_artist(artist, pushed=pushed)
|
||||
|
||||
@@ -657,7 +657,7 @@ class Database:
|
||||
artists = self.pull_artists(artist_ref, flat=flat_artist, exclude_relations=new_exclude_relations)
|
||||
if len(artists) < 1:
|
||||
continue
|
||||
album_obj.artists.append(artists[0])
|
||||
album_obj.artist_collection.append(artists[0])
|
||||
|
||||
return album_obj
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ class WritingSession:
|
||||
|
||||
self.db_objects[data_models.AlbumSong].append(db_song_album)
|
||||
|
||||
for artist in album.artists:
|
||||
for artist in album.artist_collection:
|
||||
db_album_artist = data_models.AlbumArtist(
|
||||
album = album,
|
||||
artist = self.add_artist(artist)
|
||||
|
||||
Reference in New Issue
Block a user