Rename 'notrim' option to 'none' to be consistent with other options

This commit is contained in:
7x11x13
2025-02-17 10:22:49 -05:00
parent 5c1f6e7329
commit d482cee11d
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -1439,9 +1439,9 @@ class YoutubeDL:
filename = outtmpl % info_dict
def parse_trim_file_name(trim_file_name):
if trim_file_name is None or trim_file_name == 'notrim':
if trim_file_name is None or trim_file_name == 'none':
return 0, None
mobj = re.match(r'(?:(?P<length>\d+)(?P<mode>b|c)?|notrim)', trim_file_name)
mobj = re.match(r'(?:(?P<length>\d+)(?P<mode>b|c)?|none)', trim_file_name)
return int(mobj.group('length')), mobj.group('mode') or 'c'
max_file_name, mode = parse_trim_file_name(self.params.get('trim_file_name'))
+1 -1
View File
@@ -429,7 +429,7 @@ def validate_options(opts):
}
# Other options
validate_regex('trim filenames', opts.trim_file_name, r'(?:\d+[bc]?|notrim)')
validate_regex('trim filenames', opts.trim_file_name, r'(?:\d+[bc]?|none)')
if opts.playlist_items is not None:
try:
+1 -1
View File
@@ -1378,7 +1378,7 @@ def create_parser():
help='Sanitize filenames only minimally')
filesystem.add_option(
'--trim-filenames', '--trim-file-names', metavar='LENGTH',
dest='trim_file_name', default='notrim',
dest='trim_file_name', default='none',
help='Limit the filename length (excluding extension) to the specified number of characters or bytes')
filesystem.add_option(
'-w', '--no-overwrites',