Plex Rating Uploader is a Python script that exports rated movies and shows from Plex and automatically uploads the ratings to TMDB (The Movie Database) on a specified cycle. It requires a Plex token and a TMDB API key. Completed uploads are cached in a JSON database, and if a rating changes, it is updated on TMDB accordingly. I would like to add this feature for IMDB and TVDB as well, but IMDB does not seem to work at the moment, I will check TVDB soon.
- Automatically upload ratings from Plex to TMDB
- Upload movie, series and episode ratings
- Cache completed uploads in a JSON database
- Update ratings on TMDB when they change in Plex in the next configured cycle
- Configurable upload interval
- Dockerized for easy deployment
- soon rating of single series/show episodes
- synchronize watchlist from TMDB to Plex and Plex to TMDB
- synchronize TMDB ratings to plex
- maybe add trakt support
- Python 3.x
- Plex token
- TMDB API key
-
Get the Plex-Token
Go to any of your libraries, click on any media, then click on "Get Info", then "View XML". Then you should get a long url, at the end of it you will find your Plex token. It should look like this: M1CPccYc-uHHnC1BBdc (of course this is not a valid token)
- Get the TMDB API key
https://www.themoviedb.org/settings/api
To get the TMDB api klick on the link below, register and just fill out the form with random things, for the url you need to provide, just add plex.tv or anything else. You will need the "API Read Access Token" not the "API Key"
-
Pull the Docker container from GitHub:
git clone https://github.com/2fersen/plex-rating-uploader
-
Setup the docker-compose.yml file so the container keeps running:
Change the path to data folder from the cloned directory like this:
volumes: - C:\Users\.....\data:/data
-
Update the .env with your keys and settings: Change the filename from:
template.env_template
To:
.env
-
Run the container:
docker-compose up -d
-
For updating the container:
sudo docker-compose down sudo docker-compose build --no-cache sudo docker-compose up -d
-
Install the required dependencies:
pip install -r requirements.txt
-
Edit the
.env
file with your Plex token and TMDB API key:PLEX_TOKEN=YOUR-X-Plex-Token TMDB_API_KEY=API-Read-Access-Token RUN_INTERVAL_IN_MINUTES=60 BASE_URL=http://192.168.50.226:32400
-
Run the script:
python plex_api.py
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.