Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
move skip check
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed May 11, 2024
1 parent aeb04c9 commit d577ec8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cyberdrop_dl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.3.3"
__version__ = "5.3.4"
6 changes: 6 additions & 0 deletions cyberdrop_dl/clients/download_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
5 changes: 0 additions & 5 deletions cyberdrop_dl/downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit d577ec8

Please sign in to comment.