Skip to content

Commit

Permalink
download_url: Call download_track_cached for playlists
Browse files Browse the repository at this point in the history
  • Loading branch information
resmh committed Sep 14, 2022
1 parent 62d342e commit 1a93f40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scdl/scdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ def download_playlist(client: SoundCloud, playlist: BasicAlbumPlaylist, playlist

tracknumber_digits = len(str(len(playlist.tracks)))
playlistbuffer=None if not kwargs.get("playlist_file") else []
playlistcache=None if not kwargs.get("playlist_file_cache") else playlist_map_read(kwdefget("playlist_file_name", "Likes", **kwargs) + "." + kwdefget("playlist_file_extension", "m3u8", **kwargs))
for counter, track in itertools.islice(enumerate(playlist.tracks, 1), kwargs.get("playlist_offset", 0), None):
logger.debug(track)
logger.info(f"Track n°{counter}")
Expand All @@ -547,7 +548,7 @@ def download_playlist(client: SoundCloud, playlist: BasicAlbumPlaylist, playlist
else:
track = client.get_track(track.id)

download_track(client, track, playlist_info, kwargs.get("strict_playlist"), playlist_buffer=playlistbuffer, **kwargs)
download_track_cached(client, track, playlist_info, kwargs.get("strict_playlist"), playlist_cache=playlistcache, playlist_buffer=playlistbuffer, **kwargs)
if kwargs.get("playlist_file"):
playlist_filename=playlist_filename_prefix + playlist_name + ".m3u8"
playlist_process(client, playlistbuffer, playlist_filename, **kwargs)
Expand Down

0 comments on commit 1a93f40

Please sign in to comment.