diff --git a/cyberdrop_dl/__init__.py b/cyberdrop_dl/__init__.py index 0419a93d2..07f0e9e28 100644 --- a/cyberdrop_dl/__init__.py +++ b/cyberdrop_dl/__init__.py @@ -1 +1 @@ -__version__ = "5.3.1" +__version__ = "5.3.2" diff --git a/cyberdrop_dl/clients/download_client.py b/cyberdrop_dl/clients/download_client.py index 43e8eebf4..7a0af5184 100644 --- a/cyberdrop_dl/clients/download_client.py +++ b/cyberdrop_dl/clients/download_client.py @@ -140,6 +140,9 @@ async def _append_content(self, media_item, content: aiohttp.StreamReader, updat await asyncio.sleep(0) await f.write(chunk) await update_progress(len(chunk)) + if not content.total_bytes and not media_item.partial_file.stat().st_size: + media_item.partial_file.unlink() + raise DownloadFailure(status=HTTPStatus.NOT_FOUND, message="File is empty") async def download_file(self, manager: Manager, domain: str, media_item: MediaItem) -> None: """Starts a file""" diff --git a/pyproject.toml b/pyproject.toml index fb613593f..9f48088ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cyberdrop-dl" -version = "5.3.1" +version = "5.3.2" description = "Bulk downloader for multiple file hosts" authors = ["Jules Winnfield "] readme = "README.md"