dbr / tvnamer

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

Change default show #156

Closed kdog0598 closed 4 years ago

kdog0598 commented 4 years ago

I was wondering if there was a way to change the default, number 1 result that appears for a show? For example, Mr. Robot lists "Mr. Robot Digital After Show" first which throws a wrench into my automated renaming. Is there an option I can set somewhere for certain shows like this?

dbr commented 4 years ago

Yep! The input_series_replacements config option can do that - you can replace a given string with another, or, map a string to a given TVDB ID

https://github.com/dbr/tvnamer/blob/f5a9060be8f78f45f023fb65d4d9d5dd2fef9ae6/tvnamer/config_defaults.py#L451-L454

and there are some examples here:

https://github.com/dbr/tvnamer/blob/f5a9060be8f78f45f023fb65d4d9d5dd2fef9ae6/tests/test_series_replacement.py#L38-L43

You can find the series ID on the shows page, e.g on https://www.thetvdb.com/series/mr-robot "TheTVDB.com Series ID" is 289590

kdog0598 commented 4 years ago

Thank you very much! I had found this answer in another issue but forgot to close this one. Then TVDB's api stopped working so I hadn't had the chance to try it.

msw1970 commented 4 years ago

Is it possible to use wildcards within the input_series_replacements section such as..

Marvels Agents of S

kdog0598 commented 4 years ago

Yeah you can. For mine I used {“Mr* Robot”: ###} because the period was disappearing.

msw1970 commented 4 years ago

Many thanks.. This has indeed helped, however, I do note that all of the shows now failing without this were working successfully a week ago before the changes at TVDB

kdog0598 commented 4 years ago

Yeah it’s the same on my end. At least tvdb’s api is working at all now.