Skip to content

Bulk asynchronous downloader for multiple file hosts

refactor: rename client modules (#1797)

NTFSvolume31d68bd7319b
diff --git a/cyberdrop_dl/clients/download_client.py b/cyberdrop_dl/clients/downloads.py
similarity index 99%
rename from cyberdrop_dl/clients/download_client.py
rename to cyberdrop_dl/clients/downloads.py
index cc0e9b621..7d4c68897 100644
--- a/cyberdrop_dl/clients/download_client.py
+++ b/cyberdrop_dl/clients/downloads.py
@@ -20,7 +20,7 @@ if TYPE_CHECKING:
from pathlib import Path
from typing import Any
- from cyberdrop_dl.clients.client import HTTPClient
+ from cyberdrop_dl.clients.http import HTTPClient
from cyberdrop_dl.clients.response import AbstractResponse
from cyberdrop_dl.config import Config
from cyberdrop_dl.manager import Manager
diff --git a/cyberdrop_dl/clients/client.py b/cyberdrop_dl/clients/http.py
similarity index 100%
rename from cyberdrop_dl/clients/client.py
rename to cyberdrop_dl/clients/http.py
diff --git a/cyberdrop_dl/crawlers/crawler.py b/cyberdrop_dl/crawlers/crawler.py
index 07fa61c8e..13ff623f9 100644
--- a/cyberdrop_dl/crawlers/crawler.py
+++ b/cyberdrop_dl/crawlers/crawler.py
@@ -21,7 +21,7 @@ from aiolimiter import AsyncLimiter
from typing_extensions import deprecated
from cyberdrop_dl import env
-from cyberdrop_dl.clients.client import HTTPClient, HTTPClientProxy
+from cyberdrop_dl.clients.http import HTTPClient, HTTPClientProxy
from cyberdrop_dl.crawlers._hls import HLSParser
from cyberdrop_dl.downloader.http import Downloader
from cyberdrop_dl.exceptions import MaxChildrenError, NoExtensionError, ScrapeError
diff --git a/cyberdrop_dl/downloader/http.py b/cyberdrop_dl/downloader/http.py
index 820049531..8eea7658f 100644
--- a/cyberdrop_dl/downloader/http.py
+++ b/cyberdrop_dl/downloader/http.py
@@ -10,7 +10,7 @@ from typing import TYPE_CHECKING, NamedTuple
from aiohttp import ClientConnectorError, ClientError, ClientResponseError
from cyberdrop_dl import aio, constants, ffmpeg, storage
-from cyberdrop_dl.clients.download_client import filter_by_duration
+from cyberdrop_dl.clients.downloads import filter_by_duration
from cyberdrop_dl.exceptions import (
DownloadError,
DurationError,
@@ -28,7 +28,7 @@ if TYPE_CHECKING:
from collections.abc import AsyncGenerator, Generator
from pathlib import Path
- from cyberdrop_dl.clients.download_client import DownloadClient
+ from cyberdrop_dl.clients.downloads import DownloadClient
from cyberdrop_dl.config import Config
from cyberdrop_dl.manager import Manager
from cyberdrop_dl.utils.m3u8 import M3U8, Rendition
diff --git a/cyberdrop_dl/downloader/mega_nz.py b/cyberdrop_dl/downloader/mega_nz.py
index 058d7c7ca..6b57d32b6 100644
--- a/cyberdrop_dl/downloader/mega_nz.py
+++ b/cyberdrop_dl/downloader/mega_nz.py
@@ -7,7 +7,7 @@ from mega.chunker import MegaChunker, get_chunks
from typing_extensions import override
from cyberdrop_dl import aio, storage
-from cyberdrop_dl.clients.download_client import DownloadClient, make_speed_checker
+from cyberdrop_dl.clients.downloads import DownloadClient, make_speed_checker
from cyberdrop_dl.downloader.http import Downloader
if TYPE_CHECKING:
diff --git a/cyberdrop_dl/manager.py b/cyberdrop_dl/manager.py
index 5c58b8e38..9ed3e141b 100644
--- a/cyberdrop_dl/manager.py
+++ b/cyberdrop_dl/manager.py
@@ -15,8 +15,8 @@ from pydantic.types import ByteSize
from cyberdrop_dl import __version__, cookies, env, ffmpeg, stats, yaml
from cyberdrop_dl.cli import CLIargs
-from cyberdrop_dl.clients.client import HTTPClient
-from cyberdrop_dl.clients.download_client import DownloadClient
+from cyberdrop_dl.clients.downloads import DownloadClient
+from cyberdrop_dl.clients.http import HTTPClient
from cyberdrop_dl.config import Config
from cyberdrop_dl.csv_logs import CSVLogsManager
from cyberdrop_dl.database import Database
diff --git a/pyproject.toml b/pyproject.toml
index e410118e6..bf192c778 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -52,7 +52,7 @@ license-files = ["LICENSE"]
maintainers = [{name = "NTFSvolume", email = "[email protected]"}]
readme = "README.md"
requires-python = ">=3.11"
-version = "9.7.1.dev1"
+version = "9.7.1.dev2"
[project.optional-dependencies]
apprise = [
diff --git a/tests/test_client.py b/tests/test_client.py
index a2b167f47..d5431b4c9 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -4,7 +4,7 @@ import sys
import aiohttp
import pytest
-from cyberdrop_dl.clients.client import HTTPClient
+from cyberdrop_dl.clients.http import HTTPClient
from cyberdrop_dl.exceptions import ScrapeError
from cyberdrop_dl.manager import Manager
diff --git a/tests/test_download_client.py b/tests/test_download_client.py
index 26262d171..be76ab561 100644
--- a/tests/test_download_client.py
+++ b/tests/test_download_client.py
@@ -1,7 +1,7 @@
import pytest
from multidict import CIMultiDict
-from cyberdrop_dl.clients.download_client import DownloadClient, _check_content_type, _get_content_type
+from cyberdrop_dl.clients.downloads import DownloadClient, _check_content_type, _get_content_type
from cyberdrop_dl.exceptions import InvalidContentTypeError
from cyberdrop_dl.manager import Manager
diff --git a/tests/test_manager.py b/tests/test_manager.py
index 28f14723f..79d84e231 100644
--- a/tests/test_manager.py
+++ b/tests/test_manager.py
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Any, TypeVar
import pytest
-from cyberdrop_dl.clients.client import HTTPClient
+from cyberdrop_dl.clients.http import HTTPClient
from cyberdrop_dl.config import Config
from cyberdrop_dl.database import Database
from cyberdrop_dl.dedupe import Czkawka
diff --git a/uv.lock b/uv.lock
index 6e88cab9b..cda4d954d 100644
--- a/uv.lock
+++ b/uv.lock
@@ -725,7 +725,7 @@ wheels = [
[[package]]
name = "cyberdrop-dl-patched"
-version = "9.7.1.dev1"
+version = "9.7.1.dev2"
source = { editable = "." }
dependencies = [
{ name = "aiodns", marker = "sys_platform != 'android' and sys_platform != 'win32'" },