Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3fbfc93e3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (unavailableItems.length === 0) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Allow tracked series through the per-season scan
When a TV show's earlier auto-request remains in history and its media status is PENDING, PROCESSING, or PARTIALLY_AVAILABLE, autoRequestedTmdbIds removes the show from unavailableItems, and this early return prevents loadTvSeasonNumbers from ever checking for new seasons. Thus the new per-season tracking only works after the prior request/media becomes DELETED; normal retained request history can leave later seasons unrequested. The new test masks this because its MediaRequest.request mock never persists the first request.
Useful? React with 👍 / 👎.
| entry.watchlistedAt = watchlistedAt; | ||
| entry.processedSeasonNumbers = mergeSeasonNumbers(processedSeasonNumbers); | ||
| await repository.save(entry); | ||
| } catch (error) { |
There was a problem hiding this comment.
Propagate failures to persist handled state
If request creation succeeds but this save fails, the error is swallowed and the sync reports the request as created without durable tracking. If the user subsequently deletes that request or its media before a later successful history backfill, the next sync sees neither an entry nor request history and recreates the request—the exact behavior this change is intended to prevent. Let the save failure propagate or otherwise make request creation and tracking recoverable as one operation.
Useful? React with 👍 / 👎.
|
Superseded by #305, rebuilt from the current main line with the watchlist tracking change and regression coverage. |
Description
SeerrNG's Plex auto-request already paginates watchlists and handles movies and series. This adds durable per-user entry tracking so deleting a handled request or downloaded media does not trigger another request while the Plex item stays listed. Removing and re-adding the item starts a new request cycle.
The state is scoped to the user's Plex account, existing auto-request history seeds tracking on upgrade, and TV seasons are recorded independently so later seasons can be requested without restoring deliberately deleted ones. If Plex cannot provide an item timestamp, that item remains eligible for a later sync.
This adapts the behavior to SeerrNG's existing paginated, multi-format request flow.
AI assistance was used to prepare and implement this change.
How Has This Been Tested?
pnpm test:node -- server/lib/watchlistsync.test.ts server/api/plextv.test.ts server/migration/sqlite/1791849700000-CreatePlexWatchlistSyncEntries.test.ts— 21 passed.pnpm typecheck:server— passed.git diff --check— passed.pnpm release-notes:preview --base origin/main --head HEAD— reviewed.Screenshots / Logs
Not applicable.
Release Notes
release-notes/.pnpm release-notes:preview.Checklist:
pnpm build.pnpm i18n:extract. (Not applicable; no translations changed.)