2.2 KiB
2.2 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 All Seen (Season)
The Pages#SeasonPage has a "Mark All as Seen" action that:
- Filters unwatched episodes
- Creates an
EpisodeSeenfor each - Uses the selected date and accuracy
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)