From dc29c6718c92ec4c24cc955a917579aec6664a53 Mon Sep 17 00:00:00 2001 From: Ainsey11 Date: Fri, 15 Apr 2022 09:21:24 +0100 Subject: [PATCH] Fix: #210 - Download UI Box being removed when file is still processing (#219) * Fix: https://github.com/bbilly1/tubearchivist/issues/210 - Download UI element is removed when the file has finished downloading, but is still being moved on disk to the storage destination. This means the user is presented with nothing in the UI yet the file is still being processed. * FIX: Resolving linting issue * FIX: Set moving message to never expire and then a second message after the move with a 4 second expiry timer. Co-authored-by: Rob Ainsworth --- tubearchivist/home/src/download/yt_dlp_handler.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tubearchivist/home/src/download/yt_dlp_handler.py b/tubearchivist/home/src/download/yt_dlp_handler.py index 693d0e1..5f09907 100644 --- a/tubearchivist/home/src/download/yt_dlp_handler.py +++ b/tubearchivist/home/src/download/yt_dlp_handler.py @@ -181,7 +181,22 @@ class VideoDownloader: youtube_id, video_overwrites=self.video_overwrites ) self.channels.add(vid_dict["channel"]["channel_id"]) + mess_dict = { + "status": "message:download", + "level": "info", + "title": "Moving....", + "message": "Moving downloaded file to storage folder", + } + RedisArchivist().set_message("message:download", mess_dict, False) + self.move_to_archive(vid_dict) + mess_dict = { + "status": "message:download", + "level": "info", + "title": "Completed", + "message": "", + } + RedisArchivist().set_message("message:download", mess_dict, 4) self._delete_from_pending(youtube_id) # post processing