This scripts converts the movies watched on TV Time to Trakt importing format.
- Node.js
- npm
Visit the Node documentation for more info on how to install Node.js and npm.
Open Trakt and create a new API. Then insert in the .env
file in the root directory of the project the following variables:
TRAKT_CLIENT_ID
TRAKT_CLIENT_SECRET
Example:
TRAKT_CLIENT_ID=123456abcde...
TRAKT_CLIENT_SECRET=123456abcde...
First of all you need to add your Trakt API credentials to the .env
file (see Environment variables).
Run the following command to install the dependencies:
npm install
Convert the file tracking-prod-records.csv
from your Tv Time GDPR export to a JSON file (you can use this site, make sure to check "Parse numbers" and "Output: Array" and use "Comma" as separator). The JSON file should be named tracking-prod-records.json
and should be placed in the root directory of the project.
Run the script:
node convert.js
You have to authenticate into your Trakt account: open the prompted link and insert the auth code shown in the console.
The script will try to convert the movies watched on TV Time to Trakt format, ready for import. Every entry that needs user attention will be saved in the needAttention.json
file. If this file is not empty, run the following script and select manually the alternatives:
node attentioning.js
To upload the movies to Trakt go to the import page and select "JSON File". Here you can upload the files:
movies_listed.json
movies_watched.json
attentioned_listed.json
attentioned_watched.json