Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
refactor: remove duplicated hashing (#1538)
NTFSvolumeabacf0701ea2
diff --git a/cyberdrop_dl/clients/hash_client.py b/cyberdrop_dl/clients/hash_client.pyindex d808e743a..689a660d0 100644--- a/cyberdrop_dl/clients/hash_client.py+++ b/cyberdrop_dl/clients/hash_client.py@@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, Literalfrom send2trash import send2trashfrom cyberdrop_dl import constants-from cyberdrop_dl.data_structures.hash import Hashing+from cyberdrop_dl.constants import Hashingfrom cyberdrop_dl.ui.prompts.basic_prompts import enter_to_continuefrom cyberdrop_dl.utils.logger import logfrom cyberdrop_dl.utils.utilities import get_size_or_nonediff --git a/cyberdrop_dl/config/config_model.py b/cyberdrop_dl/config/config_model.pyindex de4074b15..ed0a100c4 100755--- a/cyberdrop_dl/config/config_model.py+++ b/cyberdrop_dl/config/config_model.py@@ -7,8 +7,7 @@ from pathlib import Pathfrom pydantic import BaseModel, ByteSize, NonNegativeInt, PositiveInt, field_serializer, field_validatorfrom cyberdrop_dl import constants-from cyberdrop_dl.constants import BROWSERS, DEFAULT_APP_STORAGE, DEFAULT_DOWNLOAD_STORAGE-from cyberdrop_dl.data_structures.hash import Hashing+from cyberdrop_dl.constants import BROWSERS, DEFAULT_APP_STORAGE, DEFAULT_DOWNLOAD_STORAGE, Hashingfrom cyberdrop_dl.models import HttpAppriseURLfrom cyberdrop_dl.models.types import (ByteSizeSerilized,diff --git a/cyberdrop_dl/constants.py b/cyberdrop_dl/constants.pyindex 8e3cad953..0c2805149 100644--- a/cyberdrop_dl/constants.py+++ b/cyberdrop_dl/constants.py@@ -101,10 +101,7 @@ class Hashing(StrEnum):@classmethoddef _missing_(cls, value: object) -> "Hashing":- try:- return cls[str(value).upper()]- except KeyError as e:- raise e+ return cls[str(value).upper()]class BROWSERS(StrEnum):diff --git a/cyberdrop_dl/data_structures/hash.py b/cyberdrop_dl/data_structures/hash.pydeleted file mode 100644index 2f5379ee7..000000000--- a/cyberdrop_dl/data_structures/hash.py+++ /dev/null@@ -1,14 +0,0 @@-from enum import StrEnum, auto---class Hashing(StrEnum):- OFF = auto()- IN_PLACE = auto()- POST_DOWNLOAD = auto()-- @classmethod- def _missing_(cls, value: object):- try:- return cls[str(value).upper()]- except KeyError as e:- raise e