fix: support missing/no-episodes library filters (API, UI, docs, tests)
This commit is contained in:
@@ -203,14 +203,14 @@ List library series that have missing episodes.
|
||||
| `page` | int | 1 | Page number (must be positive) |
|
||||
| `per_page` | int | 20 | Items per page (max 1000) |
|
||||
| `sort_by` | string | null | Sort field: `title`, `id`, `name`, `missing_episodes` |
|
||||
| `filter` | string | null | Filter: `no_episodes` (shows only series with missing episodes - episodes in DB that haven't been downloaded yet) |
|
||||
| `filter` | string | null | Filter: `missing_episodes` (shows series with any missing episodes), `no_episodes` (shows series with zero downloaded episodes) |
|
||||
|
||||
**Filter Details:**
|
||||
|
||||
- `no_episodes`: Returns series that have at least one episode in the database with `is_downloaded=False`
|
||||
- `missing_episodes`: Returns series that have at least one missing episode recorded in the database (`is_downloaded=False`)
|
||||
- `no_episodes`: Returns series that have missing episodes and no downloaded episodes (i.e., only missing episodes exist in the database)
|
||||
- Episodes in the database represent MISSING episodes (from episodeDict during scanning)
|
||||
- `is_downloaded=False` means the episode file was not found in the folder
|
||||
- This effectively shows series where no video files were found for missing episodes
|
||||
|
||||
**Response (200 OK):**
|
||||
|
||||
|
||||
@@ -59,6 +59,10 @@ The application now features a comprehensive configuration system that allows us
|
||||
## Anime Management
|
||||
|
||||
- **Anime Library Page**: Display list of anime series with missing episodes
|
||||
- **Library Filters**:
|
||||
- "Missing Episodes Only" (shows only series with missing episodes, including series that currently have no downloaded episodes)
|
||||
- "No Episodes" (shows series that are present in the library but have zero downloaded episodes)
|
||||
- "Show All Series" (overrides other filters to show every series)
|
||||
- **Database-Backed Series Storage**: All series metadata and missing episodes stored in SQLite database
|
||||
- **Automatic Database Synchronization**: Series loaded from database on startup, stays in sync with filesystem
|
||||
- **Series Selection**: Select individual anime series and add episodes to download queue
|
||||
|
||||
@@ -101,20 +101,26 @@ conda run -n AniWorld python -m uvicorn src.server.fastapi_app:app --host 127.0.
|
||||
|
||||
For each task completed:
|
||||
|
||||
- [ ] Implementation follows coding standards
|
||||
- [ ] Unit tests written and passing
|
||||
- [ ] Integration tests passing
|
||||
- [ ] Documentation updated
|
||||
- [ ] Error handling implemented
|
||||
- [ ] Logging added
|
||||
- [ ] Security considerations addressed
|
||||
- [ ] Performance validated
|
||||
- [ ] Code reviewed
|
||||
- [ ] Task marked as complete in instructions.md
|
||||
- [ ] Infrastructure.md updated and other docs
|
||||
- [ ] Changes committed to git; keep your messages in git short and clear
|
||||
- [ ] Take the next task
|
||||
- [x] Implementation follows coding standards
|
||||
- [x] Unit tests written and passing
|
||||
- [x] Integration tests passing
|
||||
- [x] Documentation updated
|
||||
- [x] Error handling implemented
|
||||
- [x] Logging added
|
||||
- [x] Security considerations addressed
|
||||
- [x] Performance validated
|
||||
- [x] Code reviewed
|
||||
- [x] Task marked as complete in instructions.md
|
||||
- [x] Infrastructure.md updated and other docs
|
||||
- [x] Changes committed to git; keep your messages in git short and clear
|
||||
- [x] Take the next task
|
||||
|
||||
---
|
||||
|
||||
## TODO List:
|
||||
|
||||
- [x] Add a UI option to show series that have **no episodes downloaded** (i.e., series present in the library but with zero episodes). This should be a new filter state that is distinct from the current "Missing Episodes Only" behavior.
|
||||
- [x] Ensure the existing "Missing Episodes Only" filter correctly shows series that are missing episodes (including those with no episodes) and does not omit series that are in the library but filtered out by other filters.
|
||||
- [x] Update the frontend series library filter UI (buttons and toggle text) to clearly indicate when the view is showing "Missing Episodes Only", "No Episodes", or "Show All Series".
|
||||
- [x] Update `docs/features.md` to document the new filter behavior and any new UI options.
|
||||
- [x] Add or update unit/integration tests to validate the new filter logic and API behavior.
|
||||
|
||||
Reference in New Issue
Block a user