-
Notifications
You must be signed in to change notification settings - Fork 33
trakts CLI Reference
All commands have descriptive help messages available. So in case of doubt, simply add --help
to the (sub)command to see the help docs (Example: trakts autostart --help
and trakts --help
). For reference, the various available commands are:
Shows the status of the trakt authentication. If no token is found, or if the token in expired, it runs the authentication flow for trakt.tv.
$ trakts auth
-
--force
: Ignore the existing token, and force the authentication again.
Controls the autostart behaviour of the scrobbler.
$ trakts autostart <subcommand>
Registers the app to be started automatically with computer startup.
Disables app autostart.
Manage the backlog of watched media yet to be synced with trakt servers (mostly due to internet connectivity issues). Read this for more info.
$ trakts backlog <subcommand>
Lists all the files in the backlog.
Try to add the unsynced files to trakt history.
Edits the scrobbler config settings. See Configuration section for more details.
$ trakts config <subcommand>
This command will list the parameters in the config, along with their current values.
$ trakts config list
players.monitored = ['mpv', 'vlc']
players.skip_interval = 5
general.enable_notifs = True
fileinfo.whitelist = ['/path/to/movies', '/path/to/anime', '/path/to/TV']
-
--all
: List ALL the config parameters, including those not overriden by the user.
Set the value for a config parameter, overriding the previous value.
- Separate multiple values with spaces.
$ trakts config set players.monitored mpv vlc mpc-be
User config updated with 'players.monitored = ['mpv', 'vlc', 'mpc-be']'
- For values containing space(s), surround them with double-quotes.
$ trakts config set fileinfo.whitelist D:\Media\Movies "C:\Users\My Name\Shows"
User config updated with 'fileinfo.whitelist = ['D:\\Media\\Movies', 'C:\\Users\\My Name\\Shows']'
-
--add
: Avoid overwriting the previous list values (whitelist, monitored, etc.).
$ trakts config set players.monitored mpv vlc
User config updated with 'players.monitored = ['mpv', 'vlc']'
$ trakts config set --add players.monitored plex mpc-hc # NOTE "--add" used here
User config updated with 'players.monitored = ['mpv', 'vlc', 'plex', 'mpc-hc']'
Reset a config value to its default.
$ trakts config unset players.mpc-hc.poll_interval
Successfully unset players.mpc-hc.poll_interval
Runs the initial setup of the scrobbler.
$ trakts init
Access the log file, mainly for debugging purposes.
$ trakts log <subcommand>
Opens the latest log file in your default editor. If this doesn't work, use the path command and open the file yourself.
Prints the location of the log file.
Searches for the given name on Trakt.
$ trakts lookup Breaking Bad
- You can specify a year to limit the results
$ trakts lookup Inglorious Basterds --year 2009
- You can specify the type (
movie
/show
)
$ trakts lookup --type show Breaking Bad
- By default, only the top 3 results are fetched. Use a combination of
--limit
(number of results per page) and--page
(page number) options to get more results.
Command to run the auth flow for Plex.
$ trakts plex
-
--force
: Ignore the existing token, and force the authentication again.
Run the scrobbler in the foreground. Mainly needed in case you have disabled the autostart service, and want to run the app manually.
$ trakts run
Starts the trakt-scrobbler service. If already running, does nothing.
$ trakts start
-
--restart
: Force restart the service.
Shows the status of trakt-scrobbler service.
$ trakts status
Stops the trakt-scrobbler service.
$ trakts stop
Tests the connection with a player.
$ trakts test vlc
- Start the player and load some whitelisted media file into it.
- Add
-vvv
at the end to get detailed debug info for troubleshooting.
$ trakts test mpv -vvv
Shortcut command to add folder(s) to whitelist in config.
$ trakts whitelist <subcommand>
Add a path to whitelist. Don't forget to restart the scrobbler after this.
$ trakts whitelist add D:\Media\My Movies
- You can add only one path at a time, and it is ok to have spaces in the path
- It is recommended to surround the path with double quotes
$ trakts whitelist add "D:\Media\My Movies"
-
For remote urls, we only support http(s) for now, and they can be of the form
https://www.example.org/path/to/directory
and this will match all files under this directory. Example:https://www.example.org/path/to/directory/Season 1/S01E03.mp4
-
You can also specify a
*
to enable wildcard matching:https://www.example.org/path/*
https://*.example.org/path
*://www.example.org/path
-
https://*.example.org/*
will all match the urlhttps://www.example.org/path/to/directory/Season 1/S01E03.mp4
- Please note that a pattern with a
/
at the end (https://example.org/directory/
) will not match any files under that directory. If you need to match any subpath, you need to have a*
:https://example.org/directory/*
.
-
Finally, we also allow http authentication fields in the url pattern:
https://username:password@example.org/path
is ok (useful for some self-hosted servers). -
See https://github.com/jessepollak/urlmatch#examples for more examples.
-
For extracting media info, we use the path portion of the url only, ignoring the domain name. So in the above example, we use
path/to/directory/Season 1/S01E03.mp4
for figuring out the media info.
List the current folders in whitelist.
$ trakts whitelist show
Interactively remove folder(s) from whitelist.
$ trakts whitelist remove
# follow the on screen instructions now
Check whether the given file/folder is in the whitelist.
$ trakts whitelist test D:\Media\Movies