1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-12-18 23:25:42 +07:00

[options] Accept quoted string across multiple lines (#9940)

Like:

    -f "
    bestvideo+bestaudio/
    best
    "
This commit is contained in:
Jaime Marquínez Ferrándiz
2016-06-29 14:56:05 +02:00
committed by Sergey M․
parent eaaaaec042
commit 9e29ef13a3

View File

@@ -26,9 +26,7 @@ def _readOptions(filename_bytes, default=[]):
except IOError: except IOError:
return default # silently skip if file is not present return default # silently skip if file is not present
try: try:
res = [] res = compat_shlex_split(optionf.read(), comments=True)
for l in optionf:
res += compat_shlex_split(l, comments=True)
finally: finally:
optionf.close() optionf.close()
return res return res