Compare commits

..

No commits in common. "8346b549150003df988538e54c9d8bc4de568979" and "763ed06ee69f13949397897bd42ff2ec3dc3d384" have entirely different histories.

2 changed files with 2 additions and 4 deletions

View File

@ -1323,7 +1323,7 @@ class YoutubeDL:
elif (sys.platform != 'win32' and not self.params.get('restrictfilenames')
and self.params.get('windowsfilenames') is False):
def sanitize(key, value):
return str(value).replace('/', '\u29F8').replace('\0', '')
return value.replace('/', '\u29F8').replace('\0', '')
else:
def sanitize(key, value):
return filename_sanitizer(key, value, restricted=self.params.get('restrictfilenames'))

View File

@ -261,11 +261,9 @@ def validate_options(opts):
elif value in ('inf', 'infinite'):
return float('inf')
try:
int_value = int(value)
return int(value)
except (TypeError, ValueError):
validate(False, f'{name} retry count', value)
validate_positive(f'{name} retry count', int_value)
return int_value
opts.retries = parse_retries('download', opts.retries)
opts.fragment_retries = parse_retries('fragment', opts.fragment_retries)