IMDb-Trakt-Syncer 0.0.2
This script will sync user ratings both ways between Trakt and IMDb.
Keywords: python,video,trakt,imdb,ratings,sync,movies,tv shows


# IMDb-Trakt-Syncer
This script will sync user ratings for Movies and TV Shows both ways between Trakt and IMDb. Currently season and episode ratings are not supported. Ratings already set will not be overwritten. This script should work on an OS where python is supported.
## Install Instructions:
1. Install [Python](https://www.python.org/downloads/) and [Google Chrome](https://www.google.com/chrome/). _If these are already installed on your machine you can ignore this step. Please note this script does not effect Chrome in anyway it is simply required in order for chromedriver to work._
2. Run `python -m pip install IMDbTraktSyncer` in command line.
3. Login to [Trakt](https://trakt.tv/oauth/applications) and create a new API application. We will name it `IMDbTraktSyncer`. In the Redirect uri field enter `urn:ietf:wg:oauth:2.0:oob` then Save. 
4. Run the script by calling `IMDbTraktSyncer` in command line. Follow the prompts on first run. It will ask you to fill in your Trakt client id and client secret from step 3. It will also ask you to enter your IMDb username and password. Please note that these details are saved insecurely as credentials.txt in the same folder as the script. Recommended to change your password to something unique beforehand.
5. Done, setup complete. The script will continue to run and sync your ratings. This may take some time, you can follow its progress in the command line.

## Run:
`IMDbTraktSyncer` in command line.

## Update:
`python -m pip install IMDbTraktSyncer --upgrade` in command line.

## Uninstall:
`python -m pip uninstall IMDbTraktSyncer` in command line.

## Alternative manual install method:
1. Download the latest .zip from the releases page and move it to the file directory of your choice.
2. Run the IMDbTraktSyncer.py. Follow the prompts on first run. It will ask you to fill in your Trakt client id and client secret from step 3. It will also ask you to enter your IMDb username and password. Please note that these details are saved insecurely as credentials.txt in the same folder as the script. Recommended to change your password to something unique beforehand.
3. Done. The script will continue to run and sync your ratings. This may take some time, you can follow its progress in the command line.

## Troubleshooting, known issues, workarounds & future outlook:
* IMDb may require a captcha on login. If you see "Not signed in" appear in the script then the script will fail and the captcha is likely to be the cause. To fix this, navigate to IMDb website in your browser, preferably Chrome and from the same computer. If logged in, logout, and log back in. It may ask you to fill in a captch, complete it and finish logging in. After logging in succesfully on your browser run the script again and it should work. You may need to repeat this step once or twice if it still gives you issues. I'm looking into adding a captcha solver into the script to solve this problem, but it is currently not implemented. 
* If you see an error about having the incorrect version of Chrome driver. Uninstall it by running `python -m pip uninstall chromedriver-py` in command line. In your Chrome browser navigate to Settings > About Chrome and check your version (112... or 111 etc). This would indicate you are on Chrome version 112. Navigate to [chromedriver-py releases page](https://pypi.org/project/chromedriver-py/#history) and find the latest version that is the same Chrome version (112) already on your machine. Copy the version number you need. Then in command line run `python -m pip install chromedriver-py==VERSION_NUMBER`. Replace VERSION_NUMBER wuth the version you copied and press enter. This will install the correct chromedriver version. Run the script again and it should work.
* Due to IMDb's lack of API and lack of rating import ability, this script uses a rather unconvential method that mimics using a web browser to set ratings on IMDB. So there are many points of failure that could arise. I will try my best to keep the script updated as best possible.
* If any of your details change, passwords, logins, api keys etc, just delete credentials.txt and that will reset the script. It will prompt you to enter your new details on next run.