getShowWatchedProgress method

Future<ShowWatchedProgress> getShowWatchedProgress(
  1. String id, {
  2. bool hidden = false,
  3. bool specials = false,
  4. bool? countSpecials,
})

Returns watched progress for a show including details on all aired seasons and episodes.

The next_episode will be the next episode the user should watch, if there are no upcoming episodes it will be set to null. If not null, the reset_at date is when the user started re-watching the show. Your app can adjust the progress by ignoring episodes with a last_watched_at prior to the reset_at.

By default, any hidden seasons will be removed from the response and stats. To include these and adjust the completion stats, set the hidden flag to true.

By default, specials will be excluded from the response. Set the specials flag to true to include season 0 and adjust the stats accordingly. If you'd like to include specials, but not adjust the stats, set countSpecials to false.

Note: Only aired episodes are used to calculate progress. Episodes in the future or without an air date are ignored.

id - Trakt ID, Trakt slug, or IMDB ID hidden - include any hidden seasons specials - include specials as season 0 countSpecials - count specials in the overall stats (only applies if specials are included)

🔒 OAuth Required

Implementation

Future<ShowWatchedProgress> getShowWatchedProgress(String id,
    {bool hidden = false, bool specials = false, bool? countSpecials}) async {
  Map<String, String> params = {
    "hidden": hidden.toString(),
    "specials": specials.toString()
  };

  if (specials && countSpecials != null) {
    params["count_specials"] = countSpecials.toString();
  }
  return await _manager._authenticatedGet<ShowWatchedProgress>(
      "shows/$id/progress/watched",
      queryParamameters: params);
}