feat(sonarr): monitor new seasons when latest is requested#3157
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThis PR adds a new ChangesSonarr 'latest' season monitoring feature
Sequence Diagram(s)sequenceDiagram
participant User
participant SonarrModal
participant MediaRequestSubscriber
participant resolveMonitorNewItems
participant Sonarr
User->>SonarrModal: Select 'Latest Season Requested'<br/>& request show with selected seasons
SonarrModal->>MediaRequestSubscriber: Create media request with seasons
MediaRequestSubscriber->>resolveMonitorNewItems: Pass setting='latest',<br/>requestedSeasons, availableSeasons
alt Latest season in request
resolveMonitorNewItems-->>MediaRequestSubscriber: return 'all'
else Latest season not in request
resolveMonitorNewItems-->>MediaRequestSubscriber: return 'none'
end
MediaRequestSubscriber->>Sonarr: addSeries with computed<br/>monitorNewItems value
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
I don't think we want tests for Sonarr yet.
@fallenbagel wdyt? Maybe we should do add all *arr tests at once in another PR?
If so, the whole PR could be simplified without that resolveMonitorNewItems helper function.
Description
Adds a third option to the Sonarr Monitor New Seasons setting: Latest Season Requested.
Future seasons are monitored only when the request includes the latest regular season. Older-only requests use No New Seasons, while the existing All and None behavior remains unchanged.
How Has This Been Tested?
git diff --checkAll,None, latest-season selection, older-season selection, and specials4.0.17.2952No New SeasonsAll SeasonsScreenshots / Logs (if applicable)
The Simpsons with only older seasons requested:

S.W.A.T. with the latest season included:

Checklist:
pnpm buildpnpm i18n:extractSummary by CodeRabbit
New Features
Documentation
Tests