Support paths with spaces in them for N_m3u8

This commit is contained in:
chu23465 2025-04-16 14:56:36 +05:30
parent 0b240e7308
commit fe942132dd
3 changed files with 18 additions and 7 deletions

15
poetry.lock generated
View File

@ -1494,6 +1494,17 @@ files = [
{file = "pycodestyle-2.7.0.tar.gz", hash = "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"}, {file = "pycodestyle-2.7.0.tar.gz", hash = "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"},
] ]
[[package]]
name = "pycountry"
version = "24.6.1"
description = "ISO country, subdivision, language, currency and script definitions and their translations"
optional = false
python-versions = ">=3.8"
files = [
{file = "pycountry-24.6.1-py3-none-any.whl", hash = "sha256:f1a4fb391cd7214f8eefd39556d740adcc233c778a27f8942c8dca351d6ce06f"},
{file = "pycountry-24.6.1.tar.gz", hash = "sha256:b61b3faccea67f87d10c1f2b0fc0be714409e8fcdcc1315613174f6466c10221"},
]
[[package]] [[package]]
name = "pycparser" name = "pycparser"
version = "2.22" version = "2.22"
@ -2154,7 +2165,7 @@ files = []
develop = true develop = true
[package.dependencies] [package.dependencies]
beautifulsoup4 = "^4.11.2" beautifulsoup4 = "^4.8.2"
click = "^8.1.3" click = "^8.1.3"
langcodes = "^3.4.0" langcodes = "^3.4.0"
lxml = "^5.3.0" lxml = "^5.3.0"
@ -2523,4 +2534,4 @@ type = ["pytest-mypy"]
[metadata] [metadata]
lock-version = "2.0" lock-version = "2.0"
python-versions = "^3.9" python-versions = "^3.9"
content-hash = "1a0f03a0e4fab6a762553bf233c99d2119cc130da559fa6102c1fa88e377d6e7" content-hash = "d6b9563126bec58d43aa054636d2f6972b53bcab3d13fc13972899134aba0b96"

View File

@ -49,7 +49,7 @@ tqdm = "^4.67.0"
Unidecode = "^1.2.0" Unidecode = "^1.2.0"
validators = "^0.18.2" validators = "^0.18.2"
websocket-client = "^1.1.0" websocket-client = "^1.1.0"
xmltodict = "^0.14.0" xmltodict = "^0.14.2"
yt-dlp = "^2024.11.11" yt-dlp = "^2024.11.11"
[tool.poetry.group.dev.dependencies] [tool.poetry.group.dev.dependencies]

View File

@ -249,14 +249,14 @@ async def m3u8dl(uri, out, track, headers=None, proxy=None):
arguments = [ arguments = [
executable, executable,
uri, uri,
"--save-dir", os.path.dirname(out), "--save-dir", f'"{os.path.dirname(out)}"',
"--tmp-dir", os.path.dirname(out), "--tmp-dir", f'"{os.path.dirname(out)}"',
"--save-name", os.path.basename(out).replace(".mp4", ""), "--save-name", f'"{os.path.basename(out).replace(".mp4", "")}"',
"--write-meta-json", "False", "--write-meta-json", "False",
"--log-level", "ERROR", "--log-level", "ERROR",
"--thread-count", "96", "--thread-count", "96",
"--download-retry-count", "20", "--download-retry-count", "20",
"--ffmpeg-binary-path", ffmpeg_binary, "--ffmpeg-binary-path", f'"{ffmpeg_binary}"',
"--binary-merge" "--binary-merge"
] ]
if headers and track.source == "HS": if headers and track.source == "HS":