fixed crash while tagging that arouse from refactor

This commit is contained in:
Hellow 2023-04-18 15:31:41 +02:00
parent ab5af4aaa9
commit a56ccc463d
2 changed files with 2 additions and 8 deletions

View File

@ -125,7 +125,7 @@ class Song(MainObject):
id3Mapping.TRACKNUMBER: [self.tracksort_str]
})
metadata.merge_many([s.metadata for s in self.source_collection])
# metadata.merge_many([s.get_song_metadata() for s in self.source_collection]) album sources have no relevant metadata for id3
metadata.merge_many([a.metadata for a in self.album_collection])
metadata.merge_many([a.metadata for a in self.main_artist_collection])
metadata.merge_many([a.metadata for a in self.feature_artist_collection])

View File

@ -97,13 +97,7 @@ class Source(DatabaseObject):
@property
def metadata(self) -> Metadata:
if self.type_enum == SourceTypes.SONG:
return self.get_song_metadata()
if self.type_enum == SourceTypes.ARTIST:
return self.get_artist_metadata()
return super().metadata
return self.get_song_metadata()
@property
def indexing_values(self) -> List[Tuple[str, object]]: