I'm retroactively scanning for missing trailers, but when a movie has a - instead of : in the folder name, the lookup in TMDB seems to fail. In many OS filesystems, a colon : cannot be used so - is added instead.
Example:
- Folder:
Chicken Run - Dawn of the Nugget (2023) parses into:
- Title:
Chicken Run - Dawn of the Nugget
- Year:
2023
- TMDB title:
Chicken Run: Dawn of the Nugget
The TMDB API gets checked using the following snippet. A quick test to replace the special characters, makes it work with a lot of movies.
# https://github.com/jsaddiction/TrailerTech/blob/main/providers/tmdb.py#L198
for result in response['results']:
- if str(year) in result['release_date'] and result['title'].lower() == title.lower():
+ if str(year) in result['release_date'] and result['title'].lower().replace(":", "") == title.lower().replace(" -", ""):
return result['id']
Ideally, we strip out special characters in this string matcher?
I'm retroactively scanning for missing trailers, but when a movie has a
-instead of:in the folder name, the lookup in TMDB seems to fail. In many OS filesystems, a colon:cannot be used so-is added instead.Example:
Chicken Run - Dawn of the Nugget (2023)parses into:Chicken Run - Dawn of the Nugget2023Chicken Run: Dawn of the NuggetThe TMDB API gets checked using the following snippet. A quick test to replace the special characters, makes it work with a lot of movies.
Ideally, we strip out special characters in this string matcher?