A Python script to import TV Time tracked episode and movie data into Trakt.TV - using data export provided by TV Time through a GDPR request.
This script was made possible by the following contributors.
localStorage.json
- when you restart the script, the program will skip those episodes which have been marked 'imported'. Processed movies are also stored in the same file.TV Time's API is not open. In order to get access to your personal data, you will have to request it from TV Time's support via a GDPR request - or maybe just ask for it, whatever works, it's your data.
Install the following frameworks via Pip:
python -m pip install -r requirements.txt
Create a new file named config.json
in the same directory of TimeToTrakt.py
, using the below JSON contents (replace the values with your own).
Use forward slash or double backslash for GDPR_WORKSPACE_PATH
if you encounter json.decoder.JSONDecodeError: Invalid \escape: line 4 column 31 (char 206)
, as seen here and here.
The movie and show data is usually in "tracking-prod-records.csv" and "tracking-prod-records-v2.csv" respectively, however please check this is where your data is actually stored.
Date format can be left as the default value unless you receive an error. If you receive an error about the time data not matching format, update this value using the docs.
{
"CLIENT_ID": "YOUR_CLIENT_ID",
"CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"MOVIE_DATA_PATH": "DIRECTORY_OF_YOUR_GDPR_REQUEST_MOVIE_DATA",
"SHOW_DATA_PATH": "DIRECTORY_OF_YOUR_GDPR_REQUEST_SHOW_DATA",
"TRAKT_USERNAME": "YOUR_TRAKT_USERNAME",
"DATE_FORMAT": "%Y-%m-%d %H:%M:%S"
}
Once the config is in place, execute the program using python TimeToTrakt.py
. The process isn't 100% automated - you will need to pop back, especially with large imports, to check if the script requires a manual user input.