mirror of
https://github.com/THIS-IS-NOT-A-BACKUP/zspotify.git
synced 2024-11-26 09:53:17 +01:00
commit
05e2cdda7d
@ -50,11 +50,15 @@ def download_episode(episode_id) -> None:
|
||||
episode_id = EpisodeId.from_base62(episode_id)
|
||||
stream = ZSpotify.get_content_stream(episode_id, ZSpotify.DOWNLOAD_QUALITY)
|
||||
|
||||
download_directory = os.path.dirname(__file__) + ZSpotify.get_config(ROOT_PODCAST_PATH) + extra_paths
|
||||
download_directory = os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
ZSpotify.get_config(ROOT_PODCAST_PATH),
|
||||
extra_paths,
|
||||
)
|
||||
create_download_directory(download_directory)
|
||||
|
||||
total_size = stream.input_stream.size
|
||||
with open(download_directory + filename + MusicFormat.OGG.value,
|
||||
with open(os.path.join(download_directory, f"{filename}.ogg"),
|
||||
'wb') as file, tqdm(
|
||||
desc=filename,
|
||||
total=total_size,
|
||||
@ -67,4 +71,4 @@ def download_episode(episode_id) -> None:
|
||||
stream.input_stream.stream().read(ZSpotify.get_config(CHUNK_SIZE))))
|
||||
|
||||
# convert_audio_format(ROOT_PODCAST_PATH +
|
||||
# extra_paths + filename + '.ogg')
|
||||
# extra_paths + filename + '.ogg')
|
||||
|
Loading…
Reference in New Issue
Block a user