diff options
author | pukkandan <pukkandan@gmail.com> | 2021-02-18 00:39:38 +0530 |
---|---|---|
committer | pukkandan <pukkandan@gmail.com> | 2021-02-18 01:06:40 +0530 |
commit | c2934512c29e300e7a525c339751c9a8bde65e1b (patch) | |
tree | 2613aaee9435252418f2233ee4846ac04accd284 /youtube_dlc/options.py | |
parent | 55e36f035cff0b7b75118930bb7bd03a75ffd534 (diff) | |
download | hypervideo-pre-c2934512c29e300e7a525c339751c9a8bde65e1b.tar.lz hypervideo-pre-c2934512c29e300e7a525c339751c9a8bde65e1b.tar.xz hypervideo-pre-c2934512c29e300e7a525c339751c9a8bde65e1b.zip |
Option `--windows-filenames` to force use of windows compatible filenames
* Also changed `--trim-file-name` to `--trim-filenames` to be similar to related options
Related: https://web.archive.org/web/20210217190806/https://old.reddit.com/r/youtubedl/comments/llc4o5/do_you_guys_also_have_this_error
:ci skip dl
Diffstat (limited to 'youtube_dlc/options.py')
-rw-r--r-- | youtube_dlc/options.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/youtube_dlc/options.py b/youtube_dlc/options.py index cb8e8236a..bb37554ec 100644 --- a/youtube_dlc/options.py +++ b/youtube_dlc/options.py @@ -878,9 +878,21 @@ def parseOpts(overrideArguments=None): help='Restrict filenames to only ASCII characters, and avoid "&" and spaces in filenames') filesystem.add_option( '--no-restrict-filenames', - action='store_false', dest='restrictfilenames', default=False, + action='store_false', dest='restrictfilenames', help='Allow Unicode characters, "&" and spaces in filenames (default)') filesystem.add_option( + '--windows-filenames', + action='store_true', dest='windowsfilenames', default=False, + help='Force filenames to be windows compatible') + filesystem.add_option( + '--no-windows-filenames', + action='store_false', dest='windowsfilenames', + help='Make filenames windows compatible only if using windows (default)') + filesystem.add_option( + '--trim-filenames', '--trim-file-names', metavar='LENGTH', + dest='trim_file_name', default=0, type=int, + help='Limit the filename length (excluding extension) to the specified number of characters') + filesystem.add_option( '-A', '--auto-number', action='store_true', dest='autonumber', default=False, help=optparse.SUPPRESS_HELP) @@ -992,10 +1004,6 @@ def parseOpts(overrideArguments=None): '--rm-cache-dir', action='store_true', dest='rm_cachedir', help='Delete all filesystem cache files') - filesystem.add_option( - '--trim-file-name', metavar='LENGTH', - dest='trim_file_name', default=0, type=int, - help='Limit the filename length (extension excluded)') thumbnail = optparse.OptionGroup(parser, 'Thumbnail Images') thumbnail.add_option( |