fix/clean_feature_artists #38
@ -235,14 +235,14 @@ class Pages:
|
||||
|
||||
# manage the naming
|
||||
naming: Dict[str, List[str]] = defaultdict(list, naming)
|
||||
naming["song"].append(song.title_string)
|
||||
naming["song"].append(song.title_value)
|
||||
naming["isrc"].append(song.isrc)
|
||||
naming["album"].extend(a.title_string for a in song.album_collection)
|
||||
naming["album"].extend(a.title_value for a in song.album_collection)
|
||||
naming["album_type"].extend(a.album_type.value for a in song.album_collection)
|
||||
naming["artist"].extend(a.name for a in song.artist_collection)
|
||||
naming["artist"].extend(a.name for a in song.feature_artist_collection)
|
||||
for a in song.album_collection:
|
||||
naming["label"].extend([l.title_string for l in a.label_collection])
|
||||
naming["label"].extend([l.title_value for l in a.label_collection])
|
||||
# removing duplicates from the naming, and process the strings
|
||||
for key, value in naming.items():
|
||||
# https://stackoverflow.com/a/17016257
|
||||
|
@ -339,6 +339,10 @@ class OuterProxy:
|
||||
def title_string(self) -> str:
|
||||
return str(self.__getattribute__(self.TITEL)) + (f" {self.id}" if DEBUG_PRINT_ID else "")
|
||||
|
||||
@property
|
||||
def title_value(self) -> str:
|
||||
return str(self.__getattribute__(self.TITEL))
|
||||
|
||||
def __repr__(self):
|
||||
return f"{type(self).__name__}({self.title_string})"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user