Skip to content

Resolve current items before catch-up probing - #2

Open
natedogg058 wants to merge 1 commit into
Generator:devfrom
natedogg058:fix-catchup-stale-items-dev
Open

natedogg058 wants to merge 1 commit into
Generator:devfrom
natedogg058:fix-catchup-stale-items-dev

Conversation

@natedogg058

Copy link
Copy Markdown

Summary

  • queue item IDs instead of BaseItem instances in catch-up mode
  • deduplicate queued IDs and re-resolve current repository items after the debounce
  • apply SelectedLibraryIds through AncestorIds, matching scheduled-mode filtering
  • skip deleted and already-probed items before probing
  • preserve cancellation behavior
  • add focused regression coverage for stale objects, duplicate IDs, deleted/already-probed items, selected-library filtering, and cancellation

ItemAdded can fire before a scan has finished populating episode hierarchy. Persisting that original object after probing can overwrite newer SeriesId, SeasonId, episode numbering, and related hierarchy fields. Re-resolving by ID immediately before probing avoids persisting stale scan state.

Related issue: firestaerter3#4

Validation

The equivalent correction was previously validated on Jellyfin 12.1 with 54 plugin tests and two live catch-up batches totaling 30 episodes. All episode hierarchy was preserved through restart/rescan. Two independent 60-second remote probe timeouts remained, so this PR does not claim to solve probe-timeout reliability.

This branch also adds six focused unit regressions covering the corrected queue lifecycle.

This branch has not been deployed

No deployments
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