getWatchlist
Retrieves all media items in the current user’s watchlist.Array of watch items that are marked as in the watchlist
Unique identifier for the watch item
The Movie Database (TMDB) ID for the media
Type of media (e.g., “movie”, “tv”)
Whether the item is in the watchlist
Current watch status: “want-to-watch”, “watching”, or “finished”
Watch progress percentage (0-100)
User reaction: “liked” or “not-for-me”
Media title
URL to media poster/image
Media rating
getMediaState
Retrieves the tracking state for a specific media item, regardless of watchlist membership.TMDB ID of the media item
Type of media (“movie” or “tv”)
The watch item object if it exists, or null
setWatchlistMembership
Adds or removes a media item from the user’s watchlist.TMDB ID of the media item
Type of media (“movie” or “tv”)
Whether to add (true) or remove (false) from watchlist
Media title
URL to media poster image
Media rating
Media release date
Media description/overview
Behavior
- Creates a new watch item if it doesn’t exist (when adding to watchlist)
- Updates existing watch item’s watchlist membership
- When adding to watchlist, sets default
progressStatusto “want-to-watch” - Preserves existing progress and reaction data when toggling membership
setProgressStatus
Updates the watch progress status for a media item.TMDB ID of the media item
Type of media (“movie” or “tv”)
Progress status: “want-to-watch”, “watching”, or “finished”
Watch progress percentage (0-100)
Media title
URL to media poster image
Media rating
Media release date
Media description/overview
Behavior
- Auto-sets progress to 0 when status is “want-to-watch”
- Auto-sets progress to 100 when status is “finished”
- Creates new watch item if it doesn’t exist
- Updates existing item if found
setReaction
Sets or clears a user’s reaction to a media item.TMDB ID of the media item
Type of media (“movie” or “tv”)
Reaction: “liked” or “not-for-me”
Set to true to clear the reaction
Media title
URL to media poster image
Media rating
Media release date
Media description/overview
updateProgress
Updates watch progress for a media item, typically called from the video player.TMDB ID of the media item
Type of media (“movie” or “tv”)
Watch progress percentage (0-100)
Legacy status field for compatibility
Set to true to mark as fully watched (sets progress to 100)
Behavior
- Auto-infers
progressStatusbased on progress percentage - Sets status to “finished” when progress >= 95% or
isWatchedis true - Sets status to “watching” when progress > 0
- Creates new watch item if it doesn’t exist
upsertWatchlistItem
Legacy mutation for backward compatibility during the status model rollout. Adds or updates a watchlist item using the old combined status field.TMDB ID of the media item
Type of media (“movie” or “tv”)
Legacy combined status: “plan-to-watch”, “watching”, “completed”, “liked”, or “dropped”
Watch progress percentage (0-100)
Media title
URL to media poster image
Media rating
Media release date
Media description/overview
This function maps legacy status values to the new split model (progressStatus + reaction).
New code should use
setWatchlistMembership, setProgressStatus, and setReaction instead.removeWatchlistItem
Legacy mutation that removes an item from the watchlist while preserving its progress and reaction data.TMDB ID of the media item
Type of media (“movie” or “tv”)
This sets
inWatchlist to false but keeps the watch item record.
New code should use setWatchlistMembership with inWatchlist: false instead.backfillWatchItems
One-time migration helper that backfills split status fields (progressStatus and reaction) for the current user’s existing watch items.No arguments required
