jsaddiction / TrailerTech

Download Trailers for you movies
MIT License
13 stars 4 forks source link

Trailers not downloded, TMDB have multiple trailers #42

Closed geek-baba closed 2 years ago

geek-baba commented 2 years ago

Hi - this is great tool and I am loving it! I however noticed that few trailers are not downloaded even when TMDB has multiple trailers. Few examples:

Singin' in the Rain The King's Man

docker exec -it radarr-uhd /bin/bash -c '/config/scripts/TrailerTech/TrailerTech.py -d "movies-uhd/The Kings Man (2021)"'
2022-05-30 11:12:54,470 - INFO - TrailerTech - Starting TrailerTech
2022-05-30 11:12:54,470 - INFO - TrailerTech - Parsing "movies-uhd/The Kings Man (2021)" in single movie mode.
2022-05-30 11:12:54,744 - INFO - TrailerTech - No local or downloadable trailers for "The Kings Man" (2021)
2022-05-30 11:12:54,744 - INFO - TrailerTech - Cleaning up temp directory.
2022-05-30 11:12:54,745 - INFO - TrailerTech - Script Completed Successfully!

           TrailerTech Stats:
           Movie Directories Scanned: 1
           Trailers Downloaded:       0
           Missing Trailers:          1
           Completed In:              0s

Let me know if you need more info.

jsaddiction commented 2 years ago

Can you edit your settings.ini and set logging to debug mode and run the command again? It should then report why a specific download was removed from its list of potential candidates.

geek-baba commented 2 years ago

Here you go:

docker exec -it radarr-uhd /bin/bash -c '/config/scripts/TrailerTech/TrailerTech.py -d "movies-uhd/The Kings Man (2021)"'
2022-05-30 12:04:03,965 - INFO - TrailerTech - Starting TrailerTech
2022-05-30 12:04:03,965 - INFO - TrailerTech - Parsing "movies-uhd/The Kings Man (2021)" in single movie mode.
2022-05-30 12:04:04,050 - DEBUG - media.movieFolder - Movie Found: The Kings Man (2021) Bluray-2160p - {imdb-tt6856242}.mkv
2022-05-30 12:04:04,050 - DEBUG - media.movieFolder - Parsed title from folder: The Kings Man
2022-05-30 12:04:04,050 - DEBUG - media.movieFolder - Parsed year from folder: 2021
2022-05-30 12:04:04,125 - DEBUG - media.movieFolder - Parsed IMDB from movie file name: 2021 Bluray-2160p - {imdb-tt6856242}
2022-05-30 12:04:04,125 - DEBUG - media.movieFolder - Parsed title from folder: The Kings Man
2022-05-30 12:04:04,125 - DEBUG - media.movieFolder - Parsed year from folder: 2021
2022-05-30 12:04:04,125 - DEBUG - providers.tmdb - Getting data from TMDB
2022-05-30 12:04:04,125 - DEBUG - providers.tmdb - Searching by Title and Year: The Kings Man 2021
2022-05-30 12:04:04,290 - DEBUG - providers.tmdb - TMDB reported "Not Found"
2022-05-30 12:04:04,290 - DEBUG - media.movieFolder - Parsed title from folder: The Kings Man
2022-05-30 12:04:04,290 - DEBUG - media.movieFolder - Parsed year from folder: 2021
2022-05-30 12:04:04,290 - DEBUG - TrailerTech - Found 0 trailer Links for "The Kings Man" (2021).
2022-05-30 12:04:04,290 - DEBUG - media.movieFolder - Parsed title from folder: The Kings Man
2022-05-30 12:04:04,290 - DEBUG - media.movieFolder - Parsed year from folder: 2021
2022-05-30 12:04:04,290 - INFO - TrailerTech - No local or downloadable trailers for "The Kings Man" (2021)
2022-05-30 12:04:04,290 - INFO - TrailerTech - Cleaning up temp directory.
2022-05-30 12:04:04,291 - INFO - TrailerTech - Script Completed Successfully!

           TrailerTech Stats:
           Movie Directories Scanned: 1
           Trailers Downloaded:       0
           Missing Trailers:          1
           Completed In:              0s
jsaddiction commented 2 years ago

It appears that your folder naming convention removed the apostrophe and trailer tech can't find it because of this. Look in the wiki and try to force the title and include the apostrophe.

Optionally you can pass the tmdbid of the film. Using these flags will make trailer tech ignore folder names in preference to user supplied info.

Additional, when called from radarr, it uses imbd/tmdb id's provided by radarr which prevents these issues.

geek-baba commented 2 years ago

Thanks for the tip, manually adding tmdb or imdb id works, and good to know that from radarr the tmdb/imdb values are passed.

However I was curious and wanted to see if their is scope for an enhancement, I use radarr to rename the files in following format:

{Movie CleanTitle} ({Release Year})/{Movie CleanTitle} ({Release Year}) {Quality Title} - {imdb-{ImdbId}}

which removes any special character from the movie title, so my question is if the script could pick up the plex format of imdb in curly braces from the file name for manual scrapping?

jsaddiction commented 2 years ago

When manual scraping, trailer tech looks for any xml files in the movie directory. If one is found and it has imdb or tmdb id's, then those id's are used. If not then as a fall back, a very rudimentary method of extracting title and year from the folder naming convention is used.

I don't use plex and am not familiar with how it parses local files but if it has any xml files in it then there should not be any issues unless the xml is using tags which my script isn't aware of.

I will close this issue for now. Feel free to post any details on how plex expects info bound files and maybe I can add them to the script in a later release. Additionally I can look into extracting that data from the path. Only issue I see is that everyone uses different naming conventions.

geek-baba commented 2 years ago

Thanks for looking into this and providing valuable input!