From 90d685da816daa8e207491b03d3628ca94d9be6d Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Mon, 6 May 2024 12:53:06 +0200 Subject: [PATCH] feat: implemented correct merging of artists --- music_kraken/pages/youtube_music/youtube_music.py | 3 ++- music_kraken/utils/shared.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/music_kraken/pages/youtube_music/youtube_music.py b/music_kraken/pages/youtube_music/youtube_music.py index 1265eeb..61fe534 100644 --- a/music_kraken/pages/youtube_music/youtube_music.py +++ b/music_kraken/pages/youtube_music/youtube_music.py @@ -410,7 +410,7 @@ class YoutubeMusic(SuperYouTube): return results def fetch_artist(self, source: Source, stop_at_level: int = 1) -> Artist: - artist = Artist() + artist = Artist(source_list=[source]) # construct the request url = urlparse(source.url) @@ -431,6 +431,7 @@ class YoutubeMusic(SuperYouTube): dump_to_file(f"{browse_id}.json", r.text, is_json=True, exit_after_dump=False) # artist details + data: dict = r.json() header = data.get("header", {}) musicDetailHeaderRenderer = header.get("musicDetailHeaderRenderer", {}) diff --git a/music_kraken/utils/shared.py b/music_kraken/utils/shared.py index b75cf7f..5a40396 100644 --- a/music_kraken/utils/shared.py +++ b/music_kraken/utils/shared.py @@ -15,7 +15,7 @@ __stage__ = os.getenv("STAGE", "prod") DEBUG = (__stage__ == "dev") and True DEBUG_LOGGING = DEBUG and False DEBUG_TRACE = DEBUG and True -DEBUG_OBJECT_TRACE = DEBUG and False +DEBUG_OBJECT_TRACE = DEBUG and True DEBUG_OBJECT_TRACE_CALLSTACK = DEBUG_OBJECT_TRACE and False DEBUG_YOUTUBE_INITIALIZING = DEBUG and False DEBUG_PAGES = DEBUG and False