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

Filenames that start with "The" aren't correctly found. #155

Closed lamahmud closed 4 years ago

lamahmud commented 5 years ago

I'm having issues with two shows. "The 100" and "The Terror". The 100 - https://www.thetvdb.com/series/the-100 (Series ID 268592) The Terror - https://www.thetvdb.com/series/the-terror (Series ID 322191).

The error message I get with "The 100" is:

####################
# Processing file: The 100.S06E08.mp4
# Detected series: The 100 (season: 6, episode: 8)
Skipping file due to error: Season 6 of show 100% could not be found

With "The Terror", I get:

####################
# Processing file: the.terror.s02e02.720p.web.h264-tbs.mkv
# Detected series: the terror (season: 2, episode: 2)
Skipping file due to error: Season 2 of show Terror could not be found

There is a show called "Terror" which doesn't have a season 2. I know I can get around this by forcing it using the --series-id switch but it makes it a PITA to force everytime these two come around when I've got a bunch of other downloads at the same time.

I've attached the verbose checks for those two shows as a text file as well as a copy of my config. mytvnamerconfig.txt tvnamer-debug.txt

dbr commented 4 years ago

Not much can be done about which show TheTVDB returns for a given search result, however there is a better approach to mapping specific series to a specific show ID in the tvnamer config

You can use the input_series_replacement option to do the same as the --series-id argument, but with a mapping, for example:

https://github.com/dbr/tvnamer/blob/f6661e51fd8bc73757f307e6fc3081416c3f179e/tests/test_series_replacement.py#L38-L42

..will map seriesnamegoeshere.s01e01.avi to show ID 76156.

The seriesnamegoeshere part of the config is a regular expression so you can do more complex matching if necessary