added name_normalize to fix bugs with forbidden chars in videoname

pull/403/head
Drugsosos 3 years ago
parent 6985c4da41
commit 1764d54e5d
No known key found for this signature in database
GPG Key ID: F96ED7B0753A13E6

@ -21,8 +21,8 @@ def name_normalize(
name: str
) -> str:
name = re.sub(r'[?\\"%*:|<>]', '', name)
name = re.sub(r'(\D+)/(\D+)', r'\1\ or\ \2', name)
name = re.sub(r'(\d+)/(\d+)', r'\1\ of\ \2', name)
name = re.sub(r'(\D+)/(\D+)', r'\1 or\ \2', name)
name = re.sub(r'(\d+)/(\d+)', r'\1 of\ \2', name)
return name

Loading…
Cancel
Save