From 86e985acece6b2aa79e64c2782109ae275eaa636 Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Thu, 16 May 2024 17:30:53 +0200 Subject: [PATCH] fix: files don't contain id anymore --- music_kraken/download/page_attributes.py | 6 +++--- music_kraken/objects/parents.py | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/music_kraken/download/page_attributes.py b/music_kraken/download/page_attributes.py index fbf6982..997960d 100644 --- a/music_kraken/download/page_attributes.py +++ b/music_kraken/download/page_attributes.py @@ -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 diff --git a/music_kraken/objects/parents.py b/music_kraken/objects/parents.py index 16ebe6a..af74836 100644 --- a/music_kraken/objects/parents.py +++ b/music_kraken/objects/parents.py @@ -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})"