-
Notifications
You must be signed in to change notification settings - Fork 4
Command Line
Justin edited this page Jan 3, 2021
·
4 revisions
Utilizing the CLI is a bit more powerful as it allows you to override certain functions of this script. In addition you can set up a cronjob to call it on a regular basis to catch any missed or previously unavailable trailers.
-
-dRequired: Directory. Defines the directory to parse -
-rOptional: Recursive. Use this to scan an entire library -
-tOptional: Title. Use this to force a title (Must be used with year) -
-yOptional: Year. Use this to force a year (Must be used with title) -
-qOptional: Quiet. Use this to limit stdout messages to only post scan stats (useful for cron jobs) -
-imdbOptional: IMDB id. Use this to force an IMDBid -
-tmdbOptional: TMDB id. Use this to force a TMDBid -
--use_threadsOptional: Threads. Use this with recursive mode to speed up processing time. (careful this can be resource intensive) -
--delete_corruptOptional: Check for corruption in your local trailers, remove them, then attempt to download a new one.
Get a trailer for a specific movie directory
TrailerTech.py -d "/path/to/movieFolder"
Get a trailer while ignoring some data found in the movie directory
TrailerTech.py -imdb 12345 -d "/path/to/movieFolder"TrailerTech.py -tmdb tt12345 -d "/path/to/movieFolder"TrailerTech.py -t MovieTitle -y 1999 -d "/path/to/movieFolder"
Get trailers for an entire library
TrailerTech.py -rd "/path/to"TrailerTech.py --use_threads -rd "/path/to"
CronJob setup to run once a week on Sunday
- Open a terminal window
- To edit your cron jobs
crontab -e - At the end of the file enter
0 0 * * 0 /usr/bin/python3 /path/to/script/TrailerTech.py --use_threads -rd "/path/to" >/dev/null 2>&1