trakt / script.trakt

Trakt.tv movie and TV show scrobbler for Kodi
GNU General Public License v2.0
322 stars 149 forks source link

Build Status Coverage Status

Trakt.tv scrobbler and library sync

Table of Contents

What is Trakt?

Automatically scrobble all TV episodes and movies you are watching to Trakt.tv! Keep a comprehensive history of everything you've watched and be part of a global community of TV and movie enthusiasts. Sign up for a free account at Trakt.tv and get a ton of features:

What can this addon do?

What can be scrobbled?

This plugin will scrobble local media and most remote streaming content. Local media should be played in Kodi library mode. Trakt will attempt to identify the media through different third party IDs available from the metadata. TV shows are identified by TVDb ID or IMDb ID. Movies are identified by TMDb ID or IMDb ID. This allows Trakt to match the correct show or movie more accurately, regardless of the title. The best supported and recommended configuration is to use TVDb (for tv shows) and TMDb (for movies) as your scrapers.

Remote streaming content will scrobble assuming the metadata is correctly set in Kodi. Add-ons that stream content need to correctly identify TV episodes and movies with as much metadata as possible for Trakt to know what you're watching.

Installation

If your not a developer, you should only install this from the official Kodi repo via Kodi itself. If you are a dev, here is how you install the dev version:

  1. Download the zip (download it here)
  2. Install script.trakt by zip. Go to Settings > Add-ons > Install from zip file > Choose the just downloaded zip
  3. Navigate to Settings > Add-ons > Enabled add-ons > Services > Trakt
  4. Select Trakt and go to Configure
  5. Get your PIN here and enter it, change any other settings as needed
  6. Select OK to save your settings
  7. Watch something and see it show up on Trakt.tv!

or

  1. Clone this repository (or download it here) into a folder called script.trakt inside your Kodi addons folder
  2. Start Kodi (or restart if its already running)
  3. Make sure you have the modules Trakt and dateutil installed. Check under Settings > Add-ons > Get Add-ons > All Add-ons > Add-on libraries (restart if you had to install these)
  4. Navigate to Settings > Add-ons > Enabled add-ons > Services > Trakt
  5. Select Trakt and go to Configure
  6. Get your PIN here and enter it, change any other settings as needed
  7. Select OK to save your settings
  8. Watch something and see it show up on Trakt.tv!

Please note that something does not cover all Kodi possible streaming sources. Local files and strm files scrapped to your library should be OK, however generic third party streaming addons can fail. It is up to the developers of these addons to be supported by this plugin. Please take a look https://github.com/trakt/script.trakt/wiki/Providing-id's-to-facilitate-scrobbling

Problems?

"I found something that doesn't work"

Creating logfiles

Invoke sync via jsonrpc

Save this as kodi-trakt-update.sh

#!/bin/sh

# url to kodi jsonrpc
url=http://localhost:8080/jsonrpc

# https://github.com/trakt/script.trakt/issues/192#issuecomment-70359374
request='{
        "jsonrpc":"2.0",
        "method":"Addons.ExecuteAddon",
        "params":{
                "addonid":"script.trakt",
                "params":{
                        "action":"sync",
                        "silent":"False"
                }
        },
        "id":1
}'

exec curl -sSLf --include --header 'content-type: application/json;' --request POST --data-binary "$request" "$url"

Contribute

Pull requests

Translations

Translation for this add-on is done via WebLate @ https://kodi.weblate.cloud/ If you are interested in helping translate this add-on, you can find out how to register @ https://forum.kodi.tv/showthread.php?tid=363132

Please do not open pull requests for translations, these will be closed as they cannot be reviewed by the language teams.

Thanks