Let users upload videos, tag them with one or more entries, and watch them from a new Discovery Videos page. Backend: - Add Video and VideoEntry models and relations - Add video controller and /video routes - Add video thumbnail generation service (ffmpeg-static) - Add video upload storage location and config Frontend: - Add DiscoveryVideosPage with sidebar link and route - Add AddVideoDialog, VideoDropzone, EntryMultiSelect, VideoCard and VideoPlayerDialog components - Add discoveryVideos API client and useDiscoveryVideos hook - Add format helpers, video types and normalizers - Add skeleton for the page Docs: - Document the feature in docs-vault
137 lines
4.2 KiB
Markdown
137 lines
4.2 KiB
Markdown
---
|
|
title: Pages
|
|
tags:
|
|
- frontend
|
|
- pages
|
|
- react
|
|
---
|
|
|
|
# Pages
|
|
|
|
All pages in `react_frontend/src/pages/`. Lazy-loaded via `React.lazy()`. See [[Routing]] for URL mapping.
|
|
|
|
---
|
|
|
|
## HomePage
|
|
|
|
Browse trending and popular movies/TV shows from TMDB. Uses infinite scrolling via `useTmdb` hooks.
|
|
|
|
## SearchPage
|
|
|
|
TMDB multi-search with debounced input. Results checked against [[Stores|library store]] — local entries displayed if already in library.
|
|
|
|
## DashboardPage
|
|
|
|
Statistics dashboard with 7 chart components. See [[Statistics]].
|
|
|
|
Charts: `WatchActivityChart`, `WatchTimeChart`, `CouchDayChart`, `LibraryGrowthChart`, `MediaTypeChart`, `TopGenresChart`, `RatingsChart`
|
|
|
|
## LibraryPage
|
|
|
|
Entry grid showing all non-watchlist, non-hidden entries from [[Stores|library store]]. See [[Library]].
|
|
|
|
## DiscoverPage
|
|
|
|
TMDB browse by category: popular, trending, top-rated, upcoming. Uses `useTmdb` infinite queries.
|
|
|
|
Route: `/discover/:category` where category = `popular-movies`, `trending-movies`, `popular-tv`, etc.
|
|
|
|
## DiscoveryVideosPage
|
|
|
|
Personal video vault — upload, link, and watch saved videos. See [[Discovery Videos]].
|
|
|
|
Route: `/discovery-videos`.
|
|
|
|
- Infinite-scroll grid of video cards (24/page)
|
|
- "Add media" button → `AddVideoDialog` (drag & drop upload)
|
|
- Cards render `<video preload="none">` — lazy playback, zero bytes until Play
|
|
- Linked entry chips navigate to `/entry/:id`
|
|
|
|
## WatchlistPage
|
|
|
|
Grid of entries where `watchlist = true`. Similar to LibraryPage.
|
|
|
|
## CollectionsPage
|
|
|
|
Grid of all [[Collections]]. Both TMDB collections and user-created collections.
|
|
|
|
## CollectionDetailsPage
|
|
|
|
Single collection with entry list, metadata, poster/backdrop. Edit/delete/refresh actions.
|
|
|
|
## MediaPage
|
|
|
|
Browse and manage all media (images) across all entries.
|
|
|
|
## CalendarPage
|
|
|
|
Monthly [[Calendar]] view showing upcoming episode air dates. Uses `episodesApi.getByMonth()`.
|
|
|
|
## EntryDetailsPage
|
|
|
|
The main entry detail view. Width constrained to `max-w-4xl`.
|
|
|
|
Sections:
|
|
|
|
- Backdrop + poster + title + metadata
|
|
- Actions: watchlist, favorite, refresh, settings, rating
|
|
- Watch history (movies) → [[Watch Tracking]]
|
|
- Seasons list (TV) → links to SeasonPage
|
|
- Cast list → links to PersonDetailsPage; shows episode count for TV; "All Cast & Crew" link → EntryCastsPage
|
|
- Media gallery → [[Media System]]
|
|
|
|
## EntryCastsPage
|
|
|
|
Full cast & crew grid for an entry. Route: `/entry/:id/cast`. Width: `max-w-4xl`.
|
|
|
|
- Breadcrumb: `Entry Title / Cast & Crew` (Title links back to EntryDetailsPage)
|
|
- Loads ALL credits (cast + crew) via `useEntryCredits` (`GET /entries/:id/credits`) — not limited to the 10-cast preview shown on EntryDetailsPage
|
|
- Filter: All / Cast / Crew
|
|
- Sort: Credit Order, Popularity, Name, Birthday, Gender, Episodes (TV only)
|
|
- Sort direction toggle (asc/desc)
|
|
- Shows role/job label and episode count for TV series
|
|
- **Lazy loading**: renders 24 credits per chunk; an `IntersectionObserver` sentinel auto-loads the next chunk on scroll
|
|
- Links to [[Pages#PersonDetailsPage|PersonDetailsPage]]
|
|
|
|
## SeasonPage
|
|
|
|
Season detail with episode list. Width: `max-w-4xl`.
|
|
|
|
- Breadcrumb: `Title / Season x` (see [[Navigation]])
|
|
- Episode progress bar
|
|
- **Mark Season Watched** button (always visible) → opens [[Components#Dialogs|MarkSeasonWatchedDialog]]
|
|
- **Single Date mode**: marks all unwatched episodes on one date
|
|
- **Scatter Mode**: distributes episodes evenly across a date range (start → end)
|
|
- Episode list with watch status
|
|
- Links to EpisodePage
|
|
|
|
## EpisodePage
|
|
|
|
Episode detail with watch history. Width: `max-w-4xl`.
|
|
|
|
- Breadcrumb: `Title / Season x / Episode x` (see [[Navigation]])
|
|
- Episode thumbnail (TMDB still)
|
|
- `S##E##` display using `season.season_number` (not DB id)
|
|
- Prev/next episode navigation
|
|
- Watch history management
|
|
- Cast list
|
|
|
|
## PeoplePage
|
|
|
|
Browse and search people (actors, directors). Both local DB and TMDB search.
|
|
|
|
## PersonDetailsPage
|
|
|
|
Person profile with biography, filmography. Uses lazy-fetch via [[Services#PeopleManager]].
|
|
|
|
## PersonTmdbRedirectPage
|
|
|
|
Takes a TMDB person ID, fetches/creates the local person record, redirects to `PersonDetailsPage`.
|
|
|
|
## SettingsPage
|
|
|
|
App configuration + maintenance. See [[Settings Page]].
|
|
|
|
- General settings (TMDB API key, backend port)
|
|
- Cleanup section (orphan files, orphan media records)
|