Repository navigation
sync: page up next until an empty page - #358
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trakt documented that
GET sync/progress/up_nextandup_next_nitrosend placeholderX-Pagination-Item-Count/X-Pagination-Page-Countvalues; clients should request pages until one comes back empty (trakt/trakt-api5bb9376).HavePagesstops on the page count, so a placeholder that claims the last page could leave shows out of the export.handlers/sync_handler.go:fetchSyncProgressUntilEmptypages until an empty page, an unpaginated response orpages_limit; used bysync -a get_up_nextandget_up_next_nitro.get_watched_progresskeepsHavePages.TestSyncUpNextPagesUntilEmpty(page count that always claims the last page,pages_limitcap, empty first page) fails without the fix; the count-based paging test now runs on watched progress.docs/sync.md,CHANGELOG.md(Fixed).Checked live by the maintainer on 2026-11-18: per_page=100 -> 3 requests, per_page=10 -> 19 requests (18 pages + the empty one), 177 shows each, same set, no duplicates, for both actions. Note: Trakt orders the last 61 shows (ties in the sort) differently per page size; the CLI keeps the order it gets.
AI: Claude Code wrote the changes, tests and the live-check scripts; reviewed by the maintainer.