activexray / activexray/doplarr_rs

Add "Latest Season + Future" option to the season picker

Abierto
#21 1 comentario 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Rust
Estrellas
46
Forks
9
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Description

Currently the season picker only offers two extremes: pick individual seasons one by one, or use "All Seasons," which monitors every existing season (from S1) plus all future seasons in a single click. For long-running shows (anime with 100+ seasons, procedurals with 20+ seasons), that "All Seasons" click can queue an enormous back-catalog onto the download/storage pipeline.

The only current mitigation is disabling `allow_all_seasons` entirely, which also removes the future-seasons convenience and forces users into a season list that gets truncated to fit Discord's 25-option dropdown cap. That truncation currently keeps the *earliest* seasons, so for a very long-running show, users can't even see or request the season that's currently airing.

### Desired Behavior

Add a second option in the season picker, alongside "All Seasons" — something like "Latest Season" or "Latest + Future Seasons." Selecting it would:

- Monitor only the single most recent existing season (highest season_number, respecting allow_specials) instead of every season back to S1.
- Set monitor_new_items = All (the same mechanism "All Seasons" already uses) so future seasons keep getting picked up automatically.

This gives a middle ground for self-hosters who want to open requests to a wider group of users, without either (a) letting one click pull an entire back catalog, or (b) forcing manual per-season selection from a dropdown that may not even list the newest season.

Ideally gated behind its own config flag (e.g. `allow_latest_season`, mirroring the existing `allow_all_seasons`) so it can be enabled independently.

### Additional Context

Related to #18, but distinct — #18 asks to cap the picker to a single season generally; this is specifically about a third option next to "All Seasons" covering "latest + everything going forward," which is the common case for following an ongoing show without backfilling its full history.

Pointers into the code, for reference:
- `build_season_picker()` in `doplarr/src/providers/sonarr.rs` (~L234) — where the "All Seasons" sentinel option is added to the dropdown
- `ALL_SEASONS_ID` handling in `SelectedDetails::try_from` (~L462)
- Where `all_seasons` drives `monitor_new_items = Some(NewItemMonitorTypes::All)` for both existing (~L744) and new (~L818) series

A "latest season" sentinel could resolve at request time to `seasons.iter().map(|s| s.season_number).max()` (excluding specials unless `allow_specials`), then follow the same `monitor_new_items = All` path "All Seasons" already uses.

### Search Existing Issues

- [x] Yes, I have searched existing issues.

### Code of Conduct

- [x] I agree to follow Doplarr's Code of Conduct.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.