diff --git a/.vscode/settings.json b/.vscode/settings.json index ad57e7c4..b375b46a 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -25,6 +25,7 @@ "brainicism", "brotlicffi", "consoletitle", + "continuedl", "cookiesfrombrowser", "copyts", "creationflags", diff --git a/app/library/Download.py b/app/library/Download.py index c81e15ef..f7b3b8f9 100644 --- a/app/library/Download.py +++ b/app/library/Download.py @@ -276,6 +276,9 @@ class Download: params["logger"] = NestedLogger(self.logger) + if "continuedl" in params and params["continuedl"] is False: + self.delete_temp(by_pass=True) + cls = YTDLP(params=params) self.started_time = int(time.time()) @@ -435,11 +438,16 @@ class Download: return False - def delete_temp(self): + def delete_temp(self, by_pass: bool = False): if self.temp_disabled or self.temp_keep is True or not self.temp_path: return - if "finished" != self.info.status and self.info.downloaded_bytes and self.info.downloaded_bytes > 0: + if ( + not by_pass + and "finished" != self.info.status + and self.info.downloaded_bytes + and self.info.downloaded_bytes > 0 + ): self.logger.warning( f"Keeping temp folder '{self.temp_path}', as the reported status is not finished '{self.info.status}'." ) @@ -457,7 +465,11 @@ class Download: return status = delete_dir(tmp_dir) - self.logger.info(f"Temp folder '{self.temp_path}' deletion is {'success' if status else 'failed'}.") + if by_pass: + tmp_dir.mkdir(parents=True, exist_ok=True) + self.logger.info(f"Temp folder '{self.temp_path}' emptied.") + else: + self.logger.info(f"Temp folder '{self.temp_path}' deletion is {'success' if status else 'failed'}.") async def progress_update(self): """ diff --git a/ui/app/assets/css/style.css b/ui/app/assets/css/style.css index f4db7fe0..17fefacd 100644 --- a/ui/app/assets/css/style.css +++ b/ui/app/assets/css/style.css @@ -358,9 +358,11 @@ div.is-centered { justify-content: center; } - .modal-content-max { - width: max-content; + width: calc(100% - 20px); + max-width: 1344px; + min-width: 320px; + box-sizing: border-box; padding: 0; - margin: 0; + margin: 0 auto; } diff --git a/ui/app/components/ConditionForm.vue b/ui/app/components/ConditionForm.vue index ee1edaa7..e7ff9fed 100644 --- a/ui/app/components/ConditionForm.vue +++ b/ui/app/components/ConditionForm.vue @@ -90,22 +90,20 @@
-