Files
Showy/changes.md
T
Mohammed Abad ce01dc34fa feat(backend): fix credit duplicates, support multi-role TV credits, fix collection upload
- Fix credit dedup key to people_id + cast_type (scoped to entry_id)
- Detect aggregate_credits format via Array.isArray(c.roles) instead of is_tvseries flag
- Join multiple roles/jobs with "; " instead of taking only the first
- Add episode_count field to Credit model from total_episode_count
- Increase character and job columns to VARCHAR(500)
- Deselect existing collection posters/backdrops before inserting new upload
- Updated docs-vault
- Updated some agents files
2026-04-23 16:51:18 +01:00

32 lines
2.5 KiB
Markdown

### Milestone 001
#### Backend Changes
- Added `WHERE accuracy = 'EXACT'` filter to `getWatchdayDistribution` in `statisticsController.js` for both EpisodeSeen and EntrySeen queries, so CouchDay chart only reflects exact-date data
#### Frontend Changes
- **EntrySeenDialog**: Replaced Calendar popover with native `<input type="date">` for easier year selection; merged date + accuracy into a single row; removed unused `date` state
- **EpisodeSeenEditDialog**: Merged date input and accuracy select into one flex row
- **LibraryGrowthChart**: Changed `getEntryDate` to use only `createdAt` (removed `date_first_seen` fallback); removed watchlist filter so all entries are included
- **SeasonPage**: Added `max-w-4xl` width constraint; changed breadcrumb from "Back to entry" to "Title / Season x" with link to entry
- **EpisodePage**: Added `max-w-4xl` width constraint; changed breadcrumb from generic "Entry / Season" to "Title / Season x / Episode x"; fixed S## display to use `season.season_number` instead of `seasonId` (DB id)
- **SettingsPage**: Added "Cleanup" card section with Scan/Delete buttons for orphan files and orphan media records, using existing maintenance API endpoints
- Created `api/maintenance.ts` API client for maintenance endpoints
### Milestone 001.1
#### Backend Changes
- Fixed credit duplicate bug: changed unique key from `people_id + cast_type + tmdb_credit_id` to `people_id + cast_type` (scoped to entry_id) so TV series credits aren't re-inserted on every refresh
- Fixed TV series character/job extraction: now detects aggregate_credits format via `Array.isArray(c.roles)` instead of relying on `is_tvseries` flag; joins all roles/jobs with `"; "` instead of only taking the first
- Added `episode_count` field to Credit model, populated from `total_episode_count` in aggregate_credits response, tracked in change detection and `updateOnDuplicate`
- Increased `character` and `job` column size from VARCHAR(100) to VARCHAR(500) to accommodate multiple roles joined by `"; "`
- Fixed collection media upload: now deselects existing posters/backdrops (`isSelected = false`) before inserting new custom upload
#### Frontend Changes
- Created `MarkSeasonWatchedDialog` — dedicated dialog for marking a season as watched, replacing the old two-step EpisodeSeenEditDialog+ConfirmDialog flow
- Added **Scatter Mode** toggle: distributes episodes across a date range (start → end) with an even spread, shows preview of days and max episodes/day
- "Mark Season Watched" button is now always visible (not hidden when all episodes are watched)