A container to sync watched media between Plex and Trakt
3.9K
This project adds a two-way-sync between trakt.tv and Plex Media Server. It requires a trakt.tv account but no Plex premium and no Trakt VIP subscriptions, unlike the Plex app provided by Trakt.
I am not actively maintaining this, so use at own risk, there may be bugs and the documentation and comments are lacking at best.
To setup this on your own machine, first clone or download this repo.
pip3 install -r requirements.txt
Rename app_config.json.example to app_config.json in app/data/ folder
To connect to Trakt you need to create a new API app: Visit
https://trakt.tv/oauth/applications/new, give it a meaningful name and enter
urn:ietf:wg:oauth:2.0:oob as the redirect url. You can leave Javascript
origins and the checkboxes blank.

You can run python3 get_configs.py to generate the config files with the required credentials for Plex and Trakt. Follow the prompt guide to do so.
If you need to only generate the config for either Plex or Trakt run the script like so:
python3 get_configs.py plexpython3 get_configs.py traktMake sure you are in the app/ folder and run it with:
python3 main.py
docker run --rm -v /absolute-path-to-this-repo/app/data:/app/data vbutacu/plex-trakt-sync
For both Local and Docker methods you can take a look at the progress in the last_update.log file which will be created in the app/data folder
To disable parts of the functionality of this software, look no further than
app_config.json. Here, in the sync section, you can disable the following things
by setting them from true to false in a text editor:
The first execution of the script will (depending on your PMS library size) take a long time. After that, movie details and Trakt lists are cached, so it should run a lot quicker the second time. This does mean, however, that Trakt lists are not updated dynamically (which is fine for lists like "2018 Academy Award Nominees" but might not be ideal for lists that are updated often). Here are the execution times on my Plex server: First run - 1228 seconds, second run - 111 seconds
The PyTrakt API keys are not stored securely, so if you do not want to have a file containing those on your harddrive, you can not use this project.
Content type
Image
Digest
Size
49.5 MB
Last updated
almost 5 years ago
docker pull vbutacu/plex-trakt-sync