feat: show episode info on download and history cards
- Add includeEpisode:true to Sonarr queue and history API requests in both the poller and historyFetcher - Add extractEpisode() / gatherEpisodes() helpers in dashboard.js and history.js to build a sorted, deduplicated episodes array covering all records matching a download title (handles multi- episode packs and series packs) - Replace episodeInfo: sonarrMatch with episodes: gatherEpisodes() across all 8 assignment sites in dashboard.js - Add episodes field to /api/history/recent response items - Frontend: formatEpisodeInfo() renders S01E05 for single episodes or 'Multiple episodes' with hover tooltip listing all for packs - CSS: .episode-info and .multi-episode tooltip styles - ARCHITECTURE.md: update polling table and download/history schemas
This commit is contained in:
@@ -250,8 +250,8 @@ Every `POLL_INTERVAL` ms (default 5000), the poller fetches from all services in
|
||||
| SABnzbd Queue | `GET /api?mode=queue` | `output=json` |
|
||||
| SABnzbd History | `GET /api?mode=history` | `limit=10` |
|
||||
| Sonarr Tags | `GET /api/v3/tag` | — |
|
||||
| Sonarr Queue | `GET /api/v3/queue` | `includeSeries=true` |
|
||||
| Sonarr History | `GET /api/v3/history` | `pageSize=10` |
|
||||
| Sonarr Queue | `GET /api/v3/queue` | `includeSeries=true`, `includeEpisode=true` |
|
||||
| Sonarr History | `GET /api/v3/history` | `pageSize=10`, `includeEpisode=true` |
|
||||
| Radarr Queue | `GET /api/v3/queue` | `includeMovie=true` |
|
||||
| Radarr History | `GET /api/v3/history` | `pageSize=10` |
|
||||
| Radarr Tags | `GET /api/v3/tag` | — |
|
||||
@@ -408,7 +408,7 @@ Each matched download produces an object with:
|
||||
| `speed` | string | Current download speed |
|
||||
| `eta` | string | Estimated time remaining |
|
||||
| `seriesName` / `movieName` | string | Friendly media title |
|
||||
| `episodeInfo` / `movieInfo` | object | Full *arr queue/history record |
|
||||
| `episodes` | `{season, episode, title}[]` | (Series only) Episodes covered by this download, sorted by season/episode. Single-episode downloads have one entry; series packs have multiple. Empty array if Sonarr has no episode data. |
|
||||
| `allTags` | string[] | All resolved tag labels on the series/movie |
|
||||
| `matchedUserTag` | string / null | Tag label matching the requesting user, or `null` |
|
||||
| `tagBadges` | `{label, matchedUser}[]` / undefined | (Admin `showAll` only) Each tag classified against full Emby user list |
|
||||
@@ -616,6 +616,9 @@ Returns recently completed (imported or failed) downloads from Sonarr/Radarr his
|
||||
"outcome": "imported",
|
||||
"title": "Show.S01E01.720p",
|
||||
"seriesName": "My Show",
|
||||
"episodes": [
|
||||
{ "season": 1, "episode": 1, "title": "Pilot" }
|
||||
],
|
||||
"coverArt": "https://…/poster.jpg",
|
||||
"completedAt": "2026-05-15T18:00:00.000Z",
|
||||
"quality": "720p",
|
||||
@@ -631,6 +634,7 @@ Returns recently completed (imported or failed) downloads from Sonarr/Radarr his
|
||||
```
|
||||
|
||||
- `outcome` is `"imported"` or `"failed"`. Records with other event types (e.g. `grabbed`) are filtered out.
|
||||
- `episodes` is a sorted array of `{ season, episode, title }` objects. Single-episode downloads have one entry; series packs have multiple. `title` is `null` if not returned by Sonarr. Empty array if Sonarr has no episode data.
|
||||
- `failureMessage` is only included when the authenticated user is an admin and `outcome` is `"failed"`.
|
||||
- `arrRecordId` is only included for admin users.
|
||||
- Results are sorted newest first.
|
||||
|
||||
Reference in New Issue
Block a user