From bf2d47d6401cd44516ef8a736afb283faf3f4f8d Mon Sep 17 00:00:00 2001 From: Ali Hamdi Ali Fadel Date: Sat, 29 Jun 2024 20:03:32 +0300 Subject: [PATCH] Fix downloader _should_retry criteria --- tafrigh/downloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tafrigh/downloader.py b/tafrigh/downloader.py index 6f34596..e3bfa60 100644 --- a/tafrigh/downloader.py +++ b/tafrigh/downloader.py @@ -56,10 +56,10 @@ def _initialize_youtube_dl_without_archive(self) -> None: def _should_retry(self, url_data: dict[str, Any]) -> bool: if '_type' in url_data and url_data['_type'] == 'playlist': for entry in url_data['entries']: - if entry and not os.path.exists(os.path.join(self.output_dir, f"{entry['id']}.{entry['ext']}")): + if entry and not os.path.exists(os.path.join(self.output_dir, f"{entry['id']}.mp3")): return True else: - if not os.path.exists(os.path.join(self.output_dir, f"{url_data['id']}.{url_data['ext']}")): + if not os.path.exists(os.path.join(self.output_dir, f"{url_data['id']}.mp3")): return True return False