correctly mark status as cancelled.
This commit is contained in:
parent
309d4ca013
commit
19b78c9564
2 changed files with 6 additions and 4 deletions
|
|
@ -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())
|
||||||
|
|
|
||||||
|
|
@ -494,7 +494,7 @@ class DownloadQueue(metaclass=Singleton):
|
||||||
nEvent = Events.ITEM_MOVED
|
nEvent = Events.ITEM_MOVED
|
||||||
nStore = "history"
|
nStore = "history"
|
||||||
nTitle = "Upcoming Premiere" if is_premiere else "Upcoming Live Stream"
|
nTitle = "Upcoming Premiere" if is_premiere else "Upcoming Live Stream"
|
||||||
nMessage = f"{'Premiere video' if is_premiere else 'Stream' } '{dlInfo.info.title}' is not available yet. {text_logs}"
|
nMessage = f"{'Premiere video' if is_premiere else 'Stream'} '{dlInfo.info.title}' is not available yet. {text_logs}"
|
||||||
|
|
||||||
dlInfo.info.status = "not_live"
|
dlInfo.info.status = "not_live"
|
||||||
dlInfo.info.msg = nMessage.replace(f" '{dlInfo.info.title}'", "")
|
dlInfo.info.msg = nMessage.replace(f" '{dlInfo.info.title}'", "")
|
||||||
|
|
@ -535,7 +535,7 @@ class DownloadQueue(metaclass=Singleton):
|
||||||
LOG.error(f"Failed to parse live_in date '{release_in}'. {e!s}")
|
LOG.error(f"Failed to parse live_in date '{release_in}'. {e!s}")
|
||||||
dlInfo.info.error += f" Failed to parse live_in date '{release_in}'."
|
dlInfo.info.error += f" Failed to parse live_in date '{release_in}'."
|
||||||
else:
|
else:
|
||||||
dlInfo.info.error += f" Delaying download by '{300+dl.extras.get('duration',0)}' seconds."
|
dlInfo.info.error += f" Delaying download by '{300 + dl.extras.get('duration', 0)}' seconds."
|
||||||
|
|
||||||
nMessage = f"'{dlInfo.info.title}': '{dlInfo.info.error.strip()}'."
|
nMessage = f"'{dlInfo.info.title}': '{dlInfo.info.error.strip()}'."
|
||||||
|
|
||||||
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue