dbr / tvnamer

Automatic TV episode file renamer, uses data from thetvdb.com via tvdb_api
https://pypi.python.org/pypi/tvnamer/
The Unlicense
919 stars 116 forks source link

Is there an easy way to generate filenames with not white spaces? #209

Closed alienbogart closed 2 years ago

alienbogart commented 2 years ago

Title.

dbr commented 2 years ago

Simplest way is to add a space into the custom_filename_character_blacklist option, which will replace them with the character specified in replace_invalid_characters_with (default is _)

https://github.com/dbr/tvnamer/blob/3.0.4/tvnamer/config_defaults.py#L79-L82

You can also use the output_filename_replacements to do more specific replacements: https://github.com/dbr/tvnamer/blob/3.0.4/tests/test_custom_replacement.py#L109-L117