retraktarr
is a "reverse" Trakt.tv list implementation for Radarr/Sonarr that creates Trakt.tv lists for your movies/series using APIs.
retraktarr
is a Python script to sync your Radarr/Sonarr library to a Trakt.tv list using the respective APIs.
The original idea stemmed from my wanting to have a list of monitored movies I could share with friends. This was to be the equivalent of a mdblist, but cherry-picked. Providing a more curated list of what I believed was worth considering to watch for downloading.
The goal was to add the list to Radarr, set up a filter for the list with Exists in Library and On Exclusion List = false, and allow friends to easily keep up to date with my recommended movies through the Discover tab.
This use case was admittedly very narrow, and a few more use cases have emerged since.
requests
module if running from source)
pip3 install requests
retraktarr
supports both Radarr and Sonarr in sourcing the media to sync to your lists. You can specify either or both for syncing, as well as filter what should be added with CLI arguments.
retraktarr
will need API access to whichever Arr(s) you intend to use.
A Trakt.tv account with an API set up is obviously necessary.
Name
and RedirectURI
https://google.com
for your redirect URI. We will need to steal a parameter from the redirect to complete the OAuth2 process.Client ID
, Client Secret
, and an Authorize
button.Authorize
. Click Yes
. You will be redirected to Google (or your URI) and in the URL bar you will see ?code=
followed by 64 alphanumeric characters. Save this for now. This is your OAuth2 Authorization code.retraktarr
.You can either download the source yourself or install the package from PyPI using the pip3 install retraktarr
command.
retraktarr
uses a config file, named retraktarr.conf
(by default) to get many of its settings. However, some of these can be overridden with an argument you pass. You can run retraktarr
at any time to see the available options.
To generate the config template, simply run retraktarr
without a .conf
file present. It will tell you exactly where the default config file was generated and it's location.
Open in your favorite text editor and complete the necessary details for your usage.
If you've never run retraktarr
before, you will need to leave your oauth2_token
and oauth2_refresh
options blank and use the --oauth
argument to complete the authorization process and automatically save your tokens. They will be automatically refreshed if a valid refresh token is available upon expiration.
options:
-h, --help show this help message and exit
--oauth OAUTH, -o OAUTH
Update OAuth2 Bearer Token. Accepts the auth code and requires valid Trakt config settings
(ex: -o CODE_HERE)
--radarr, -r Synchronize Radarr movies with Trakt.tv
--sonarr, -s Synchronize Sonarr series with Trakt.tv
--all, -all, -a Synchronize both Starr apps with Trakt.tv
--mon, -m Synchronize only monitored content with Trakt.tv
--missing Synchronize only missing Radarr content with Trakt.tv
--qualityprofile QUALITYPROFILE, -qp QUALITYPROFILE
The quality profile you wish to sync to Trakt.tv
--tag TAG, -t TAG The arr tag you wish to sync to Trakt.tv
--cat, -c Add to the Trakt.tv list without deletion (concatenate/append to list)
--list LIST, -l LIST Specifies the Trakt.tv list name. (overrides config file settings)
--wipe, -w Erases the associated list and performs a sync (requires -all or -r/s)
--privacy PRIVACY, -p PRIVACY
Specifies the Trakt.tv list privacy settings (private/friends/public - overrides config file
settings)
--genre GENRE, -g GENRE
Specifies the genre(s) of content to add to your list (OR logic)
--refresh Forces a refresh_token exchange (oauth) and sets the config to a new tokens.
--timeout TIMEOUT Specifies the timeout in seconds to use for POST commands to Trakt.tv
--version Displays version information
--config CONFIG If a path is provided, retraktarr will use this config file, otherwise it outputs default config location.
retraktarr.py
in the root directory, and not in the retraktarr directory.--cat/-c
parameter.-list
- when you use --all
or -r -s
- each Arr will sync to the list specified in the config.conf file.-all
is not generally recommended, consider chaining multiple runs.--cat/-c
)--wipe
or large list processing, use the --timeout <sec>
command. Default is 30, increase it until your list is processed completely.