This commit is contained in:
IlyaShurupov 2024-07-10 15:42:15 +03:00
parent 366860a1ad
commit 22e19557d8
5 changed files with 162 additions and 7 deletions

View file

@ -22,4 +22,10 @@ def save_data(data, name):
file_path = os.path.join(data_dir, f"{name}.json")
with open(file_path, 'w') as file:
json.dump(data, file, indent=4)
return f"Data saved to {name}.json."
return f"Data saved to {name}.json."
def get_artists_str(artists_pack):
track_artists = [artist['name'] for artist in artists_pack]
artists = " ".join(track_artists)
return artists