- New notes: History, Artwork - Rewrite TMDB Integration: single detail request, entry mapper, rate limiter, refresh sync, stale-entry refresh, recommendations - Update pages, routing, API reference, models, database migrations, services, components, hooks, API clients, settings, media system, library, Electron (Tauri in progress) and known issues - Rewrite README for the current React/Express stack and setup
60 lines
2.5 KiB
Markdown
60 lines
2.5 KiB
Markdown
---
|
||
title: History
|
||
tags:
|
||
- feature
|
||
- history
|
||
- watch-tracking
|
||
---
|
||
|
||
# History
|
||
|
||
## Overview
|
||
|
||
Everything you watched, by year, at `/history` (sidebar → History, or the command palette). Built from [[Watch Tracking|EntrySeen and EpisodeSeen]] records.
|
||
|
||
## Controls
|
||
|
||
- **Year picker** — only years with watches; previous / next arrows
|
||
- **Type filter** — All / Movies / TV
|
||
- Tab, year and filter are kept in the URL: `/history?tab=timeline&year=2024&type=tv`
|
||
|
||
## Tabs
|
||
|
||
### History
|
||
|
||
Months newest first, each with a sticky header (movies, episodes, watch time). Inside each month, watches are grouped by day. Each row shows the poster, title, episode, runtime and who you watched with.
|
||
|
||
### Timeline
|
||
|
||
A vertical line from the latest watch at the top down to January, with a divider per month. Poster cards alternate sides on wide screens; the dot colour marks movies (amber) or TV (blue).
|
||
|
||
### Year in Review
|
||
|
||
Wrapped-style stats: total hours (and full days), movies, episodes, shows, days watching, longest streak, busiest day, biggest binge, favourite weekday and month, top 5 shows, top genres by time, month-by-month and weekday charts, top-rated movies, rewatches, top networks, watch buddies, new shows started (first episode watched was S1E1), and the first and last watch of the year.
|
||
|
||
## Sessions
|
||
|
||
Episodes of the same show watched back to back on the same day are grouped into one **session** (e.g. "S1 E1–E5 · 5 episodes"). Lists and the timeline show sessions; the review counts individual watches.
|
||
|
||
## Unknown Dates
|
||
|
||
Watches with `accuracy = UNKNOWN` (bulk imports) are badged "Date unknown". The Year in Review leaves them out by default because they distort streaks, busiest days and monthly charts; a checkbox includes them.
|
||
|
||
## Implementation
|
||
|
||
| Layer | File |
|
||
|---|---|
|
||
| Endpoints | `backend/routes/history.routes.js` — `GET /history/years`, `GET /history/:year` |
|
||
| Service | `backend/services/historyService.js` |
|
||
| API client / hooks | `react_frontend/src/api/history.ts`, `react_frontend/src/hooks/useHistory.ts` |
|
||
| Grouping & stats | `react_frontend/src/lib/history.ts` — `buildSessions`, `groupByMonth`, `computeReview` |
|
||
| Page | `react_frontend/src/pages/HistoryPage.tsx` |
|
||
| Tabs | `react_frontend/src/components/history/` — `HistoryList`, `HistoryTimeline`, `YearInReview` |
|
||
|
||
`GET /history/:year` returns each title once in `entries` (poster, runtime, genres, networks, rating) and references it from every watch in `events`. A busy year (~1,650 watches) is about 530 KB.
|
||
|
||
## See Also
|
||
|
||
- [[Watch Tracking]]
|
||
- [[Statistics]] — all-time charts on the dashboard
|