Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
refactor: remove `videoprops` dependency (#1620)
NTFSvolumec66e0abaa314
diff --git a/cyberdrop_dl/utils/ffmpeg.py b/cyberdrop_dl/utils/ffmpeg.pyindex ff748984f..720e48f03 100644--- a/cyberdrop_dl/utils/ffmpeg.py+++ b/cyberdrop_dl/utils/ffmpeg.py@@ -15,7 +15,6 @@ from typing import TYPE_CHECKING, Any, Literal, NamedTuple, Required, Self, Typeimport aiofilesimport aiofiles.osfrom multidict import CIMultiDict, CIMultiDictProxy-from videoprops import which_ffprobe as _builtin_ffprobefrom yarl import URLfrom cyberdrop_dl.utils.logger import log_debug@@ -45,6 +44,10 @@ _EMPTY_FFPROBE_OUTPUT: FFprobeOutput = {"streams": []}def check_is_available() -> None:if not get_ffmpeg_version():raise RuntimeError("ffmpeg is not available")+ _check_ffprobe()+++def _check_ffprobe():if not get_ffprobe_version():raise RuntimeError("ffprobe is not available")@@ -56,10 +59,7 @@ def which_ffmpeg() -> str | None:@functools.cachedef which_ffprobe() -> str | None:- try:- return shutil.which("ffprobe") or _builtin_ffprobe()- except RuntimeError:- return+ return shutil.which("ffprobe")@functools.cache@@ -105,7 +105,7 @@ async def probe(input: AbsoluteHttpURL, /, *, headers: Mapping[str, str] | Noneasync def probe(input: Path | AbsoluteHttpURL, /, *, headers: Mapping[str, str] | None = None) -> FFprobeResult:- assert which_ffprobe()+ _check_ffprobe()if isinstance(input, URL):assert is_absolute_http_url(input)diff --git a/cyberdrop_dl/utils/sorting.py b/cyberdrop_dl/utils/sorting.pyindex 0b88c6e06..395446af3 100644--- a/cyberdrop_dl/utils/sorting.py+++ b/cyberdrop_dl/utils/sorting.py@@ -142,8 +142,8 @@ class Sorter:bitrate = audio.bitratesample_rate = audio.sample_rate- except (RuntimeError, CalledProcessError, OSError):- log(f"Unable to get audio properties of '{file}'")+ except (RuntimeError, CalledProcessError, OSError) as e:+ log(f"Unable to get audio properties of '{file}'", 40, exc_info=e)if await self._process_file_move(file,@@ -199,8 +199,8 @@ class Sorter:duration = video.durationframerate = video.fps- except (RuntimeError, CalledProcessError, OSError):- log(f"Unable to get some video properties of '{file}'")+ except (RuntimeError, CalledProcessError, OSError) as e:+ log(f"Unable to get some video properties of '{file}'", 40, exc_info=e)if await self._process_file_move(file,diff --git a/poetry.lock b/poetry.lockindex acbe17c10..caf990573 100644--- a/poetry.lock+++ b/poetry.lock@@ -1185,17 +1185,6 @@ files = [{file = "frozenlist-1.8.0.tar.gz", hash = "sha256:3ede829ed8d842f6cd48fc7081d7a41001a56f1f38603f9d49bf3020d59a31ad"},]-[[package]]-name = "get-video-properties"-version = "0.1.1"-description = "Get video properties"-optional = false-python-versions = "*"-groups = ["main"]-files = [- {file = "get_video_properties-0.1.1-py3-none-any.whl", hash = "sha256:04d4f478a5211917e2a7e87ddfcb1c17734cddf8374494c3993bf825b7ad4192"},-]-[[package]]name = "identify"version = "2.6.16"@@ -3067,4 +3056,4 @@ propcache = ">=0.2.1"[metadata]lock-version = "2.1"python-versions = ">=3.11,<4"-content-hash = "3e29a6a0f9cea39203d65bca7ebafff49758de494c8fa3d59386b1f3513e645e"+content-hash = "c5ccc6e30d6b7c1e170ee8308b41c269468660badcc4dc49630c291495a62721"diff --git a/pyproject.toml b/pyproject.tomlindex 72fd3cd65..ec718d913 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -11,7 +11,6 @@ dependencies = ["certifi >=2026.1.4","curl-cffi >=0.13,<0.14; implementation_name == 'cpython' ","dateparser >=1.2.2",- "get-video-properties >=0.1.1","imagesize >=1.4.1","inquirerpy >=0.3.4","jeepney >=0.9.0; 'bsd' in sys_platform or sys_platform == 'linux'",