Repository navigation
fix(jellycompat): hide dismissed and superseded entries from Resume - #114
Merged
Merged
Conversation
The jellycompat /UserItems/Resume endpoint served the raw in_progress
list, so Jellyfin clients showed every half-watched episode a profile
ever abandoned, including stale entries from earlier seasons of shows
the viewer had long moved past. The first-party Continue Watching row
already hid those via dismissal filtering and the superseded-episode
check, but that logic was private to internal/sections.
Extract the shared rules into internal/catalog
(ContinueWatchingProgressFilter, HomeDismissalIndex) and apply them to
the compat Resume path through a new UserDataService method,
FilterResumeProgress. The sections fetcher now delegates to the same
code, so both surfaces agree on what "still watching" means.
Resume pagination keeps advancing by raw batch counts so filtering
cannot terminate scans early, and the raw-offset fast path is limited
to StartIndex=0 for Resume because filtered lists make raw offsets
diverge from the visible list. The watched-items view ("completed"
status) stays unfiltered, and the per-series collapse deliberately
stays first-party only to preserve Jellyfin endpoint semantics.
Co-Authored-By: Claude Fable 5 <[email protected]>
Contributor
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughA new ChangesProgress Filtering Library & Jellycompat Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Quick104
added a commit
that referenced
this pull request
Jun 11, 2026
…114) The jellycompat /UserItems/Resume endpoint served the raw in_progress list, so Jellyfin clients showed every half-watched episode a profile ever abandoned, including stale entries from earlier seasons of shows the viewer had long moved past. The first-party Continue Watching row already hid those via dismissal filtering and the superseded-episode check, but that logic was private to internal/sections. Extract the shared rules into internal/catalog (ContinueWatchingProgressFilter, HomeDismissalIndex) and apply them to the compat Resume path through a new UserDataService method, FilterResumeProgress. The sections fetcher now delegates to the same code, so both surfaces agree on what "still watching" means. Resume pagination keeps advancing by raw batch counts so filtering cannot terminate scans early, and the raw-offset fast path is limited to StartIndex=0 for Resume because filtered lists make raw offsets diverge from the visible list. The watched-items view ("completed" status) stays unfiltered, and the per-series collapse deliberately stays first-party only to preserve Jellyfin endpoint semantics. Co-authored-by: Claude Fable 5 <[email protected]>
Quick104
added a commit
that referenced
this pull request
Jun 17, 2026
…114) The jellycompat /UserItems/Resume endpoint served the raw in_progress list, so Jellyfin clients showed every half-watched episode a profile ever abandoned, including stale entries from earlier seasons of shows the viewer had long moved past. The first-party Continue Watching row already hid those via dismissal filtering and the superseded-episode check, but that logic was private to internal/sections. Extract the shared rules into internal/catalog (ContinueWatchingProgressFilter, HomeDismissalIndex) and apply them to the compat Resume path through a new UserDataService method, FilterResumeProgress. The sections fetcher now delegates to the same code, so both surfaces agree on what "still watching" means. Resume pagination keeps advancing by raw batch counts so filtering cannot terminate scans early, and the raw-offset fast path is limited to StartIndex=0 for Resume because filtered lists make raw offsets diverge from the visible list. The watched-items view ("completed" status) stays unfiltered, and the per-series collapse deliberately stays first-party only to preserve Jellyfin endpoint semantics. Co-authored-by: Claude Fable 5 <[email protected]>
This was referenced Jun 26, 2026
2 tasks done
4 of 8 tasks
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.
Problem
The jellycompat
/UserItems/Resumeendpoint served the rawin_progressprogress list. Jellyfin clients therefore showed every half-watched episode a profile ever abandoned — many cards per series, mixed across seasons (reported with Monarch: Legacy of Monsters). The first-party Continue Watching row didn't have this problem becauseinternal/sectionsalready filters out entries the user dismissed and episodes superseded by a later-completed episode in the same series — but that logic was private to the sections fetcher.Real Jellyfin self-cleans its Resume row by clearing the playback position once an item is marked played. Silo keeps those rows as
in_progressand relies on query-time filtering, so the compat endpoint needs the same filters.Approach
Extract the shared rules into
internal/catalogand apply them on both surfaces:internal/catalog/continue_watching_progress.go(new):ContinueWatchingProgressFilter.SupersededEpisodeProgressIDs(the superseded-episode SQL, moved verbatim from sections),CompletedProgressSnapshots/ProgressSnapshots/FilterSupersededProgresshelpers, andHomeDismissalIndexwith the dismissal timestamp rule. A nil pool disables the SQL check, preserving jellycompat's no-Postgres fallback mode.internal/sections/fetcher.go: now delegates to the catalog filter; ~150 lines of moved logic deleted. First-party behavior is unchanged, including the gates (superseded filtering still only runs for continue-types that allow next-up).internal/jellycompat:UserDataServicegainsFilterResumeProgress, implemented indirectUserDataService(dismissal lookup failures log and degrade to showing entries, matching first-party; superseded query failures are hard errors, matching first-party).loadProgressPageruns each raw batch through it forin_progressstatus only — the watched-items view stays unfiltered.Reviewer notes
StartIndex=0for Resume, since filtered lists make raw store offsets diverge from the visible list; deeper pages go through the scan-from-zero branch that paginates over visible entries. Note most real requests already took that branch (EnableTotalRecordCountdefaults to true).internal/catalog/continue_watching_progress_test.gowith new coverage for the dismissal index and nil-pool path;internal/jellycompat/resume_filter_test.gopins filtering on Resume, correct totals with type filters, no filtering for the completed view, and the dismissal glue indirectUserDataService.Risks: Resume responses for profiles with many stale entries will shrink (intended). Per batch, filtering adds one dismissals lookup, one completed-progress page scan, and one episodes query — same cost profile the first-party row already pays.
AI-use disclosure: implemented with Claude Code.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Tests