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

Commit

Permalink
Fix increments for sort
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Jan 25, 2024
1 parent 33e7522 commit 933fd15
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 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.1.49"
__version__ = "5.1.51"
6 changes: 3 additions & 3 deletions cyberdrop_dl/utils/sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ async def move_cd(self, file: Path, dest: Path) -> None:
file.unlink()
return
for i in itertools.count(1):
dest = dest.parent / f"{dest.stem}{self.incrementer_format.format(i=i)}{dest.suffix}"
if not dest.is_file():
dest_make = dest.parent / f"{dest.stem}{self.incrementer_format.format(i=i)}{dest.suffix}"
if not dest_make.is_file():
break
file.rename(dest)
file.rename(dest_make)

async def check_dir_parents(self) -> bool:
"""Checks if the sort dir is in the download dir"""
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.1.49"
version = "5.1.51"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 933fd15

Please sign in to comment.