feat: watch medium distribution stats #10

Closed
opened 2026-07-10 03:53:39 +00:00 by GKaszewski · 1 comment
Owner

Add statistics showing how movies are distributed across watch mediums (cinema, streaming, TV, physical media, download, media server).

Where it could surface:

  • User profile stats section
  • Annual wrap-up report (e.g., "you watched 40% in cinema, 35% streaming")
  • Dedicated stats API endpoint

Implementation notes:

  • Query reviews grouped by watch_medium, count per medium
  • Handle NULL watch_medium (reviews logged before the feature was added)
  • Consider both all-time and per-year breakdowns
  • The WatchMedium enum already exists in domain::value_objects::review
  • Could reuse StatsRepository for the query
Add statistics showing how movies are distributed across watch mediums (cinema, streaming, TV, physical media, download, media server). **Where it could surface:** - User profile stats section - Annual wrap-up report (e.g., "you watched 40% in cinema, 35% streaming") - Dedicated stats API endpoint **Implementation notes:** - Query reviews grouped by `watch_medium`, count per medium - Handle NULL watch_medium (reviews logged before the feature was added) - Consider both all-time and per-year breakdowns - The `WatchMedium` enum already exists in `domain::value_objects::review` - Could reuse `StatsRepository` for the query
Author
Owner

Implemented in commits 587dcc0 and 07df6fe:

  • User profile Stats tab: watch medium breakdown with icons and counts
  • WrapUp report: "How You Watched" section with medium distribution
  • Backend: new queries in both SQLite and Postgres stats adapters, compute_watch_medium_stats in wrapup analyzer, watch_medium added to WrapUpMovieRow
  • Frontend: shadcn Card with WATCH_MEDIUMS icon lookup in both profile and wrapup views
Implemented in commits `587dcc0` and `07df6fe`: - **User profile Stats tab**: watch medium breakdown with icons and counts - **WrapUp report**: "How You Watched" section with medium distribution - Backend: new queries in both SQLite and Postgres stats adapters, `compute_watch_medium_stats` in wrapup analyzer, `watch_medium` added to `WrapUpMovieRow` - Frontend: shadcn Card with `WATCH_MEDIUMS` icon lookup in both profile and wrapup views
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/movies-diary#10