run update_playlist_file only when track is downloaded

This commit is contained in:
Rafael Moraes 2024-08-03 02:19:15 -03:00
parent c0d1ec2383
commit b6d1f36281

View File

@ -747,10 +747,10 @@ def main(
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("Updating M3U8 playlist")
downloader.update_playlist_file(playlist_file_path, final_path)
if save_playlist and download_queue.playlist_attributes:
playlist_file_path = downloader.get_playlist_file_path(tags)
logger.debug("Updating M3U8 playlist")
downloader.update_playlist_file(playlist_file_path, final_path)
except Exception as e:
error_count += 1
logger.error(