dbr / tvnamer

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

More verbose debug when writing custom filename pattern #216

Open cweiske opened 1 week ago

cweiske commented 1 week ago

I'm trying to add my own filename pattern and always only get an error output:

tvnamer --dry-run --verbose Episode\ 2\ Staffel\ 4\ von\ The\ Big\ Bang\ Theory.mp4 
Loading config: /home/cweiske/.config/tvnamer/tvnamer.json
####################
# Starting tvnamer
Invalid filename: Cannot parse '/home/cweiske/Videos/download/Episode 2 Staffel 4 von The Big Bang Theory.mp4'
Usage: tvnamer [options] <files>

tvnamer: error: No valid files were supplied

Despite the verbose flag, I don't see if tvnamer has a bug or if my custom filename_patterns is invalid.

I'd expect that verbose tells me when a pattern matches, but also when something else is missing (pattern incomplete, not enough info, ...).

cweiske commented 5 days ago

My issue with the regex was that the "verbose regex" option is enabled, which means that spaces are ignored. I had to replace the spaces with \s+ in my regex.