From 6c3dff566b3479c9e40bd68604e24be74ef27187 Mon Sep 17 00:00:00 2001 From: Rafael Moraes <50295204+glomatico@users.noreply.github.com> Date: Sat, 3 Aug 2024 00:39:37 -0300 Subject: [PATCH] adjust m3u8 playlist log message --- gamdl/cli.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gamdl/cli.py b/gamdl/cli.py index 3c47036..b71fc08 100644 --- a/gamdl/cli.py +++ b/gamdl/cli.py @@ -478,6 +478,7 @@ def main( ): queue_progress = f"Track {download_index}/{len(download_queue_tracks_metadata)} from URL {url_index}/{len(urls)}" try: + remuxed_path = None if download_queue.playlist_attributes: playlist_track = download_index else: @@ -741,13 +742,14 @@ def main( else: logger.debug(f'Saving cover to "{cover_path}"') downloader.save_cover(cover_path, cover_url) - logger.debug("Applying tags") - downloader.apply_tags(remuxed_path, tags, cover_url) - logger.debug(f'Moving to "{final_path}"') - downloader.move_to_output_path(remuxed_path, final_path) + if remuxed_path: + logger.debug("Applying tags") + downloader.apply_tags(remuxed_path, tags, cover_url) + logger.debug(f'Moving to "{final_path}"') + downloader.move_to_output_path(remuxed_path, final_path) if save_playlist and download_queue.playlist_attributes: playlist_file_path = downloader.get_playlist_file_path(tags) - logger.debug("Saving M3U8 playlist") + logger.debug("Updating M3U8 playlist") downloader.update_playlist_file(playlist_file_path, final_path) except Exception as e: error_count += 1