Skip to content

Add page/per_page to watched and collection sync interfaces#7

Closed
yitzhaq wants to merge 1 commit into
razzeee:mainfrom
yitzhaq:paginate-watched-collection
Closed

Add page/per_page to watched and collection sync interfaces#7
yitzhaq wants to merge 1 commit into
razzeee:mainfrom
yitzhaq:paginate-watched-collection

Conversation

@yitzhaq

@yitzhaq yitzhaq commented Jul 9, 2026

Copy link
Copy Markdown

Trakt paginates the /sync/watched and /sync/collection endpoints (trakt-api discussion #775) and returns only the first 100 items when no pagination is requested. The watched and collection interfaces currently provide no way to pass page/limit, unlike ratings, history and watchlist which already accept page/per_page.

This adds page/per_page to SyncWatchedInterface.get and SyncCollectionInterface.get, following the existing pattern in the other sync interfaces, and forwards them as query parameters so callers can page through the full result set. None values are dropped by TraktRequest.encode_query, so behaviour is unchanged when the parameters are omitted.

This is needed by the corresponding script.trakt fix for the Trakt→Kodi episode watched-status regression, where the season/episode breakdown now requires paging plus extended=progress.

Trakt now paginates the /sync/watched and /sync/collection endpoints
(trakt/trakt-api#775), returning only the
first 100 items when no paging is requested. Unlike the ratings, history and
watchlist interfaces, watched and collection had no way to pass page/limit,
so callers could not fetch beyond the first page. Add page/per_page (mirroring
the existing interfaces) and forward them as query parameters.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@yitzhaq yitzhaq force-pushed the paginate-watched-collection branch from 5bdd0a2 to a759bc6 Compare July 9, 2026 12:34
@yitzhaq

yitzhaq commented Jul 10, 2026

Copy link
Copy Markdown
Author

Closing as obsolete: the REST-client rewrite (razzeee/script.trakt@9385020) removes the script.module.trakt dependency from script.trakt entirely, so the pagination this PR added to the lib is no longer used. Equivalent handling now lives in the addon's own REST client — see razzeee/script.trakt#714.

@yitzhaq yitzhaq closed this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant