A few fixes

This commit is contained in:
Mike Schwörer 2021-11-19 17:54:07 +01:00
parent cdd013b09e
commit c8c6c7d8cc
No known key found for this signature in database
GPG Key ID: D3C7172E0A70F8CF
3 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ def download_album(album):
artist, album_name = get_album_name(album)
tracks = get_album_tracks(album)
for n, track in tqdm(enumerate(tracks, start=1), unit_scale=True, unit='Song', total=len(tracks)):
download_track('album', track[ID], extra_keys={'album_num': str(n).zfill(2), 'artist': artist, 'album': album}, disable_progressbar=True)
download_track('album', track[ID], extra_keys={'album_num': str(n).zfill(2), 'artist': artist, 'album': album_name, 'album_id': album}, disable_progressbar=True)
def download_artist_albums(artist):

View File

@ -54,7 +54,7 @@ def download_playlist(playlist):
p_bar = tqdm(playlist_songs, unit='song', total=len(playlist_songs), unit_scale=True)
enum = 1
for song in p_bar:
download_track('extplaylist', song[TRACK][ID], extra_keys={'playlist': playlist, 'playlist_num': str(enum).zfill(2)}, disable_progressbar=True)
download_track('extplaylist', song[TRACK][ID], extra_keys={'playlist': playlist[NAME], 'playlist_num': str(enum).zfill(2)}, disable_progressbar=True)
p_bar.set_description(song[TRACK][NAME])
enum += 1

View File

@ -158,10 +158,10 @@ def download_track(mode: str, track_id: str, extra_keys={}, disable_progressbar=
# add song id to archive file
if ZSpotify.CONFIG.get_skip_previously_downloaded():
add_to_archive(scraped_song_id, filename, artists[0], name)
add_to_archive(scraped_song_id, os.path.basename(filename), artists[0], name)
# add song id to download directory's .song_ids file
if not check_id:
add_to_directory_song_ids(filedir, scraped_song_id, filename, artists[0], name)
add_to_directory_song_ids(filedir, scraped_song_id, os.path.basename(filename), artists[0], name)
if not ZSpotify.CONFIG.get_anti_ban_wait_time():
time.sleep(ZSpotify.CONFIG.get_anti_ban_wait_time())