correctly mark status as cancelled.

This commit is contained in:
arabcoders 2025-08-27 19:52:15 +03:00
parent 309d4ca013
commit 19b78c9564
2 changed files with 6 additions and 4 deletions

View file

@ -361,7 +361,9 @@ class Download:
ret = await asyncio.get_running_loop().run_in_executor(None, self.proc.join) ret = await asyncio.get_running_loop().run_in_executor(None, self.proc.join)
if self.final_update: if self.final_update or self.cancelled:
if self.cancelled:
self.info.status = "cancelled"
return ret return ret
self.status_queue.put(Terminator()) self.status_queue.put(Terminator())

View file

@ -665,7 +665,7 @@ class DownloadQueue(metaclass=Singleton):
LOG.warning(f"Using external downloader '{yt_conf.get('external_downloader')}' for '{item.url}'.") LOG.warning(f"Using external downloader '{yt_conf.get('external_downloader')}' for '{item.url}'.")
item.extras.update({"external_downloader": True}) item.extras.update({"external_downloader": True})
downloaded, id_dict = self._is_downloaded(file=yt_conf.get("download_archive", None), url=item.url) downloaded, id_dict = self._is_downloaded(file=yt_conf.get("download_archive"), url=item.url)
if downloaded is True and id_dict: if downloaded is True and id_dict:
message = f"'{id_dict.get('id')}': The URL '{item.url}' is already downloaded and recorded in archive." message = f"'{id_dict.get('id')}': The URL '{item.url}' is already downloaded and recorded in archive."
LOG.error(message) LOG.error(message)