Skip to content

Technical Trakt

Kepler75 edited this page Oct 31, 2026 · 1 revision

Home › Technical reference

Trakt

Sign-in

  • Client ID: StremioK is the Trakt app, so its Client ID is built in: a public id, not a secret (Trakt gives apps installed on people's devices no secret; signing in always takes the account owner's approval).
  • The QR library is loaded the first time the sign-in opens, not at launch.
  • Tokens: an expired token is never used. Disconnecting stops everything still under way for that sign-in (a token renewal, a refresh, a change being sent: their answers are ignored).

Progress

  • Sent once past the first minute.
  • Stopped past 85% (before the credits) is sent as finished, so Trakt marks it watched, and here it leaves Continue Watching with the next episode queued.
  • Stopped between 80% and 85% is sent as 79.9% (Trakt takes no later place for something paused) while StremioK keeps your exact place.
  • Played to the credits: sent as finished too, which also clears a place Trakt kept for it.
  • A show Trakt has a paused episode of isn't added again on its next episode, unless you've since watched that episode or a later one (on any device): that paused place, and one this TV kept, is then left out.

Reading Trakt

  • Your history: Trakt sends watched lists a page at a time, and shows with their episodes only when asked. StremioK asks for them, 250 movies or 100 shows a page, and reads every page up to the count Trakt gives (100 pages at most).
  • Weighing marks: a mark made here is weighed against Trakt's history by time: marked not watched here, then watched on another device later: watched. Once Trakt confirms a "not watched", the mark here is dropped and Trakt decides again.
  • Limits: Trakt's answers are limited to 8 MB and checked (IMDb ids, season and episode numbers, lengths) before anything is kept; the watched history is kept in the TV's database.
  • Refreshes run one at a time and wait longer after a failure, and not during playback.
  • Up next lists the 15 shows you watched most recently, the latest first; finished shows are left out.

Sending changes

  • The outbox: changes are sent at once and kept until Trakt confirms them, retried after 30 s, 1 min, 2 min… (up to an hour apart, 8 tries; Trakt's Retry-After when it's busy), 100 titles / episodes a request. At most 200 changes wait. A refresh sends what's waiting first, then reads Trakt.
  • One place a title: of several places for one title waiting, only the latest is sent.
  • In the order you made them: changes to the same title or episode wait for an older one still being retried, and a newer watched / not watched (or a finish) takes back the older ones for it that haven't gone yet, so an old change can't undo a newer one.
  • Confirmed means sent: a change counts as sent only when Trakt's answer confirms it (a reply that isn't Trakt's JSON is retried); a finish Trakt already has (409) counts as sent.
  • Shows Trakt splits in two: an addon may number an episode as season 17 where Trakt has it as season 10 of another show, and Trakt answers 404. StremioK then sends it again by the episode's TheTVDB number when the addon gives it (its tvdb_id, or TheTVDB's picture of the episode).

Clone this wiki locally