feat: implemented correct merging of artists
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2024-05-06 12:53:06 +02:00
parent be7e91cb7b
commit 90d685da81
2 changed files with 3 additions and 2 deletions

View File

@@ -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", {})