mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-07 12:05:35 +00:00
Fix None input string
Fix for files without title string
This commit is contained in:
parent
068ec7a863
commit
d3e201aba7
@ -92,6 +92,9 @@ def remove_special_characters(input_string):
|
||||
Returns:
|
||||
str: A new string with specified special characters removed.
|
||||
"""
|
||||
# Replace the None input string with an empty string to avoid later exceptions, works best if moved to the begin of the process
|
||||
if input_string is None:
|
||||
return ''
|
||||
# Compile regular expression pattern to match special characters
|
||||
pattern = re.compile('[' + re.escape(special_chars_to_remove) + ']')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user