- 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
2.6 KiB
2.6 KiB
title, tags
| title | tags | |||
|---|---|---|---|---|
| Watch Tracking |
|
Watch Tracking
Overview
Showy tracks when users watch movies and episodes. Two models handle this:
| Model | For | Key Fields |
|---|---|---|
| Models#EntrySeen | Movies | entry_id, date_seen, seen_with, accuracy |
| Models#EpisodeSeen | Episodes | entry_id, episode_id, date_seen, seen_with, accuracy |
Accuracy System
Every watch record has an accuracy field indicating how precise the date_seen is:
| Value | Meaning | Used in Statistics |
|---|---|---|
EXACT |
User knows the exact date | Yes — Statistics#CouchDayChart |
ESTIMATED |
Approximate date | No — excluded from day-of-week charts |
UNKNOWN |
No date information | No |
[!tip] Why Accuracy Matters When importing historical watch data, exact dates are often unknown. The accuracy field prevents estimated dates from skewing Statistics charts that rely on day-of-week patterns.
Frontend Dialogs
EntrySeenDialog
- File:
components/dialogs/EntrySeenDialog.tsx - Used for: Movies (create/edit watch records) and TV episodes (mark season episodes as seen)
- Form: react-hook-form + zod validation
- Date input: Native
<input type="date">(allows easy year selection) - Date + accuracy displayed in same row
EpisodeSeenEditDialog
- File:
components/dialogs/EpisodeSeenEditDialog.tsx - Used for: Creating/editing individual episode watch records
- Date + accuracy in same row
- Includes "seen with" field
API Endpoints
See API Reference#Entry Seen (Movie Watch Records) and API Reference#Episode Seen (Episode Watch Records).
Hooks
- Hooks#useEntrySeen — Movie watch record CRUD
- Hooks#useEpisodeSeen — Episode watch record CRUD
Batch Operations
Mark Season Watched
The Pages#SeasonPage has a "Mark Season Watched" button (always visible) that opens the Components#Dialogs. Two modes:
Single Date Mode
- User picks a single date, accuracy, and optional "seen with"
- All unwatched episodes are marked as seen on that date
Scatter Mode
- User toggles scatter mode and picks a start date and end date
- Episodes are distributed evenly across the date range
- A preview shows total days and max episodes/day
- Each episode gets a different
date_seenbased on the distribution
Side Effects
When watch records are created/updated/deleted:
date_first_seenanddate_last_seenare updated on the Entry/Episode- Statistics queries are affected (if accuracy = EXACT)