Command line application that can sync IMDb and Trakt user data - watchlist, lists, ratings and history.
To achieve its goals the application is using the Trakt API and web scraping.
Keep in mind that this application is performing one-way sync from IMDb to Trakt. This means that any changes made on IMDb will be reflected on Trakt, but not the other way around.
Configuration
FIELD NAME
DEFAULT VALUE
ALLOWED VALUES
DESCRIPTION
IMDB_AUTH
cookies
credentials
cookies
none
Authentication method to be used for IMDb: credentials => IMDB_EMAIL + IMDB_PASSWORD field required cookies => IMDB_COOKIEATMAIN + IMDB_COOKIEUBIDMAIN fields required none => IMDB_LISTS field required
IMDB_EMAIL
-
-
IMDb account email address. Only required when IMDB_AUTH => credentials
IMDB_PASSWORD
-
-
IMDb account password. Only required when IMDB_AUTH => credentials
IMDB_COOKIEATMAIN
-
-
Cookie value only required when IMDB_AUTH => cookies. Get the following cookie information from
your browser: name: at-main | domain: .imdb.com
IMDB_COOKIEUBIDMAIN
-
-
Cookie value required when IMDB_AUTH => cookies. Get the following cookie information from your
browser: name: ubid-main | domain: .imdb.com
IMDB_LISTS
-
-
Array of IMDb list IDs that you would like synced to Trakt. If this array is not specified or empty, all
IMDb lists on your account will be synced to Trakt. In order to get the ID of an IMDb list, open it from a
browser - the ID is in the URL with format ls#########. If provided as GitHub secret or
environment variable, define its values as comma-separated list. Keep in mind the Trakt list limits!
IMDB_TRACE
false
true
false
Print tracing logs related to browser activities. Can be useful for debugging purposes
IMDB_HEADLESS
true
true
false
Whether to run the browser in headless mode or not. Only set this to false when running the syncer locally
IMDB_BROWSERPATH
-
-
The location of your preferred web browser. If you leave this value empty, the syncer will attempt to lookup
common browser locations. You can optionally override its value to use a specific browser
SYNC_MODE
dry-run
full
add-only
dry-run
Sync mode to be used when running the application: full => add Trakt items that don't exist, delete Trakt items that don't exist on IMDb,
update
Trakt items by treating IMDb as the source of truth add-only => add Trakt items that do not exist, but do not delete anything dry-run => identify what Trakt items would be added / deleted / updated
SYNC_HISTORY
false
true
false
Whether to sync history or not. When IMDB_AUTH => none, history sync will be skipped
SYNC_RATINGS
true
true
false
Whether to sync ratings or not. When IMDB_AUTH => none, ratings sync will be skipped
SYNC_WATCHLIST
true
true
false
Whether to sync watchlist or not. When IMDB_AUTH => none, watchlist sync will be skipped
SYNC_LISTS
true
true
false
Whether to sync lists or not. This provides the option to disable syncing of lists
SYNC_TIMEOUT
15m
-
Maximum duration to run the syncer. Users with large libraries might have to increase the timeout value
accordingly. Valid time units are: ns, us (or µs), ms, s, m, h
TRAKT_CLIENTID
-
-
Trakt app client ID
TRAKT_CLIENTSECRET
-
-
Trakt app client secret
TRAKT_EMAIL
-
-
Trakt account email address (do NOT confuse with username)
TRAKT_PASSWORD
-
-
Trakt account password
Usage
The application can be setup to run automatically, based on a custom schedule (default: once every 12 hours) using GitHub Actions, in a container, or locally on your machine.
Workflow schedules can be tweaked by editing the .github/workflows/sync.yaml file and committing the changes.
Please configure the application to suits your needs, by referring to the Configuration section, before running it.
Follow the relevant section below, based on how you want to use the application.