fix(api): keep the season an anime entry is about #2

Merged
thibault merged 1 commit from fix/anime-season into 0.2 2026-10-08 18:31:30 +02:00
Owner

Problem

AniList has one entry per anime season, but the anime filter only dropped single episodes: searching the releases of a season-1 entry (no season marker in its names) also returned season-2 packs (… S2 (01-10) [Batch], … (Season 02), … 2nd Season).

Fix

  • The season an anime entry is about: the season query parameter if given, else the one its names say (original title, then title, then aliases: 2nd Season, Season 2, S2 via the release-name parser, 第2期, a trailing uppercase II/III/IV), else 1. Part 2 is not treated as a season (often the second cour of the same season).
  • Anime filter: a release is kept if it is not a single episode and its name says no season, or a season range including the entry's. So a season-1 entry drops S2/Season 02/2nd Season packs but keeps unmarked batches (01-28), S01 and S01-S02; a season-2 entry keeps S2, 2nd Season, S01-S02 and unmarked batches. Dropped releases count in filtered.
  • Tests: unit tests in filter.rs (fictional titles), a season-2 batch added to the fake indexer's anime releases and the API test extended.
  • Docs: docs/INDEXERS.md filters section and the README releases paragraph.

🤖 Generated with Claude Code

## Problem AniList has one entry per anime season, but the anime filter only dropped single episodes: searching the releases of a season-1 entry (no season marker in its names) also returned season-2 packs (`… S2 (01-10) [Batch]`, `… (Season 02)`, `… 2nd Season`). ## Fix - The season an anime entry is about: the `season` query parameter if given, else the one its names say (original title, then title, then aliases: `2nd Season`, `Season 2`, `S2` via the release-name parser, `第2期`, a trailing uppercase `II`/`III`/`IV`), else 1. `Part 2` is not treated as a season (often the second cour of the same season). - Anime filter: a release is kept if it is not a single episode and its name says no season, or a season range including the entry's. So a season-1 entry drops `S2`/`Season 02`/`2nd Season` packs but keeps unmarked batches `(01-28)`, `S01` and `S01-S02`; a season-2 entry keeps `S2`, `2nd Season`, `S01-S02` and unmarked batches. Dropped releases count in `filtered`. - Tests: unit tests in `filter.rs` (fictional titles), a season-2 batch added to the fake indexer's anime releases and the API test extended. - Docs: `docs/INDEXERS.md` filters section and the README releases paragraph. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(api): keep the season an anime entry is about
Some checks failed
CI / test (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
19880debc0
AniList has one entry per season, but anime batches of every season were
kept for each of them. The entry's season is the one asked, else the one
its names say (`2nd Season`, `Season 2`, `S2`, `第2期`, a trailing `II`),
else the first; releases naming other seasons are now left out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01947SGTYxD1CJLsk2PcULRA
thibault force-pushed fix/anime-season from 19880debc0
Some checks failed
CI / test (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
to 600f933be9
All checks were successful
CI / web (pull_request) Successful in 7s
CI / test (pull_request) Successful in 26s
2026-10-08 18:30:55 +02:00
Compare
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thibault/plankton!2
No description provided.