From d577ec8522edf59c7b064811ecb3b73964a65e92 Mon Sep 17 00:00:00 2001 From: Jules-WinnfieldX Date: Sat, 11 May 2024 12:06:42 -0600 Subject: [PATCH] move skip check --- cyberdrop_dl/__init__.py | 2 +- cyberdrop_dl/clients/download_client.py | 6 ++++++ cyberdrop_dl/downloader/downloader.py | 5 ----- pyproject.toml | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index d2f4a6f4b..4db55089c 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.3.3" +__version__ = "5.3.4" diff --git a/cyberdrop_dl/clients/download_client.py b/cyberdrop_dl/clients/download_client.py index fcec813c6..79373dbe4 100644 --- a/cyberdrop_dl/clients/download_client.py +++ b/cyberdrop_dl/clients/download_client.py @@ -146,6 +146,12 @@ async def _append_content(self, media_item, content: aiohttp.StreamReader, updat async def download_file(self, manager: Manager, domain: str, media_item: MediaItem) -> None: """Starts a file""" + if self.manager.config_manager.settings_data['Download_Options']['skip_download_mark_completed']: + await log(f"Download Skip {media_item.url} due to mark completed option", 10) + await self.mark_incomplete(media_item, domain) + await self.mark_completed(media_item, domain) + return + async def save_content(content: aiohttp.StreamReader) -> None: await self._append_content(media_item, content, partial(manager.progress_manager.file_progress.advance_file, media_item.task_id)) diff --git a/cyberdrop_dl/downloader/downloader.py b/cyberdrop_dl/downloader/downloader.py index 9ac200d19..0c425b9bb 100644 --- a/cyberdrop_dl/downloader/downloader.py +++ b/cyberdrop_dl/downloader/downloader.py @@ -159,11 +159,6 @@ async def check_file_can_download(self, media_item: MediaItem) -> bool: if not await self.manager.download_manager.check_allowed_filetype(media_item): await log(f"Download Skip {media_item.url} due to filetype restrictions", 10) return False - if self.manager.config_manager.settings_data['Download_Options']['skip_download_mark_completed']: - await log(f"Download Skip {media_item.url} due to mark completed option", 10) - await self.mark_incomplete(media_item) - await self.mark_completed(media_item) - return False return True async def set_file_datetime(self, media_item: MediaItem, complete_file: Path) -> None: diff --git a/pyproject.toml b/pyproject.toml index 9e48d5c47..c1a90fcd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.3.3" +version = "5.3.4" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"