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

Commit

Permalink
Add better noextensionfailure handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Apr 8, 2024
1 parent d883d97 commit b6e08ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 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.2.22"
__version__ = "5.2.23"
2 changes: 2 additions & 0 deletions cyberdrop_dl/utils/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ async def get_filename_and_ext(filename: str, forum: bool = False) -> Tuple[str,
raise NoExtensionFailure()
if filename_parts[-1].isnumeric() and forum:
filename_parts = filename_parts[0].rsplit('-', 1)
if len(filename_parts[-1]) > 5:
raise NoExtensionFailure()
ext = "." + filename_parts[-1].lower()
filename = filename_parts[0][:MAX_NAME_LENGTHS['FILE']] if len(filename_parts[0]) > MAX_NAME_LENGTHS['FILE'] else filename_parts[0]
filename = filename.strip()
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.2.22"
version = "5.2.23"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit b6e08ed

Please sign in to comment.