Installation - sirloinofbeef/PlexTraktSync GitHub Wiki
Windows
-
If you don't have it already download Python.
Be sure to selectAdd Python X.X to PATH
alongside the default options during install. -
Download the latest version of the script, and store it somewhere you have access to.
E.g:C:\PlexTrakySync
-
Run
setup.bat
and follow the prompts. -
If you have 2 Factor Authentication enabled on Plex, you can append the code to your password.
E.g:PASSWORDcode
Linux
Open a terminal and follow these steps:
-
If you don't have it already, download and install Python:
sudo apt-get update
sudo apt-get install python3
-
Download the latest version of the script, and store it somewhere you have access to:
mkdir -p ~/scripts/
cd ~/scripts/
git clone https://github.com/sirloinofbeef/PlexTraktSync.git
-
Create a virtual environment to isolate the script from your OS:
python3 -m venv ~/scripts/PlexTraktSync/.venv
-
Install the script dependencies:
~/scripts/PlexTraktSync/.venv/bin/pip3 install -r requirements.txt
-
Run the script to start the setup and sync process:
~/scripts/PlexTraktSync/.venv/bin/python3 main.py
-
If you have 2 Factor Authentication enabled on Plex, you can append the code to your password.
E.g:PASSWORDcode
-
A cronjob line can be used to run syncs at regular intervals (optional).
This is done using the commandcrontab -e
, then entering the desired variables:
0 */12 * * * cd ~/scripts/PlexTraktSync/ && ~/scripts/PlexTraktSync/.venv/bin/python3 ~/scripts/PlexTraktSync/main.py
This example would run the script every 12 hours.
For help configuring your own crontab, try Crontab Guru
MacOS
-
Download the latest version of the script and extract it from the zip file.
- Take note of the folder in which you've unpacked the zip. In this example, the folder is in
~/Downloads
. - Make sure the name of the folder is PlexTraktSync.
- Take note of the folder in which you've unpacked the zip. In this example, the folder is in
-
Open Terminal and check if you have Python installed:
python3 --version
- If do not have Python, download and install it manually, or use Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install python
- If do not have Python, download and install it manually, or use Homebrew:
-
Open Terminal and navigate to the data folder using the command
CD
followed by the path to the script:
cd ~/Downloads/PlexTraktSync/data
-
Create a virtual environment to isolate the script from your OS:
python3 -m venv ~/Downloads/PlexTraktSync/.venv
-
Install the script dependancies:
~/Downloads/PlexTraktSync/.venv/bin/pip3 install -r requirements.txt
-
Run the script to start the setup and sync process:
~/Downloads/PlexTraktSync/.venv/bin/python3 main.py
-
A cronjob line can be used to run syncs at regular intervals (optional).
This is done using the commandcrontab -e
, then entering the desired variables:
E.g.0 */2 * * * cd ~/path/to/this/repo && ./plex_trakt_sync.sh
This example would run the script every 12 hours.
For help configuring your own crontab, try Crontab Guru
Syncing with multiple servers
Whilst the script is configured primarily for use with Hawke.one, multiple instances can be run consecutively to sync to multiple Plex servers. NOTE: Do not run more than one instance simultaneously as this will violate Trakt's polling restrictions and your account may be restricted.
Sync settings
Script options can be disabled/enabled by editing config.json
in the data
directory.
The following options can be toggled by changing them to true
or false
using a text editor:
- Downloading liked lists from Trakt and adding them to Plex (disabled by default)
- Downloading your watchlist from Trakt and adding it to Plex (disabled by default)
- Syncing the watched status between Plex and Trakt (enabled by default)
- Syncing the collected status between Plex and Trakt (disabled by default)
- Display progress information in terminal for Movies and / or Shows (enabled by default)
Notes
-
The first execution of the script will take a long time (up to 12 hours).
After that movies, shows and Trakt lists are cached, so it should run quicker.
Large sections (such as TV Shows) will still take a significant time. -
The PyTrakt API keys are not stored securely, so if you do not want to have a file containing those on your hard drive, you can not use this project.