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

Commit

Permalink
Fix downloader naming collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Dec 6, 2023
1 parent 7942cd8 commit eb9db2d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 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.0.62"
__version__ = "5.0.63"
12 changes: 10 additions & 2 deletions cyberdrop_dl/downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,16 @@ async def get_final_file_info(self, complete_file: Path, partial_file: Path,
if media_item.filename == downloaded_filename:
if partial_file.exists():
if partial_file.stat().st_size == media_item.filesize:
proceed = False
partial_file.rename(complete_file)
if complete_file.exists():
new_complete_filename, new_partial_file = await self.iterate_filename(complete_file, media_item)
partial_file.rename(new_complete_filename)
proceed = False

complete_file = new_complete_filename
partial_file = new_partial_file
else:
proceed = False
partial_file.rename(complete_file)
elif complete_file.exists():
if complete_file.stat().st_size == media_item.filesize:
proceed = False
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.0.62"
version = "5.0.63"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit eb9db2d

Please sign in to comment.