mirror of
https://github.com/THIS-IS-NOT-A-BACKUP/zspotify.git
synced 2024-11-29 19:24:34 +01:00
A few fixes
This commit is contained in:
parent
cdd013b09e
commit
c8c6c7d8cc
@ -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):
|
||||
|
@ -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
|
||||
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user