Commit Graph
160 Commits
Author SHA1 Message Date
X4Lo ac0030d611 Refresh airing TV series when the calendar is opened
- POST /entries/sync-series starts a background refresh of airing TV
  series (not Ended/Canceled, auto sync on) not refreshed in the last 24h;
  manual refreshes reset that clock. GET kept as an alias, plus
  GET /entries/sync-series/status for progress
- Reuses the rate-limited stale refresh job with a series-only scope;
  only one refresh job runs at a time
- Calendar starts the sync on visit, shows progress, and reloads episodes
  and the library when it finishes
- Remove the old SyncSeriesData, whose date check no longer worked
2026-11-20 04:02:43 +00:00
X4Lo 760afd8e84 Add history page with list, timeline and year in review
- Backend: /history/years and /history/:year return every movie and
  episode watch in a year, with entry posters, genres, networks and buddies
- History tab: watches by month and day, back-to-back episodes grouped
- Timeline tab: latest to oldest, month dividers, stacked binge sessions
- Year in Review tab: hours, top shows and genres, streaks, busiest day,
  biggest binge, monthly and weekday charts, buddies and new shows
- Year picker, movies/TV filter, state kept in the URL; unknown-date
  watches badged and excluded from the review by default
- History link in the sidebar and command palette
2026-11-05 16:09:24 +00:00
X4Lo 28eee34548 Unify entry page for TMDB previews and add artwork section
- Entry details page now also renders entries not in the library, using
  the TMDB preview mapped to the same entry shape; remove TmdbPreviewPage
- Preview endpoint returns an entry-shaped object, TMDB seasons and
  directors
- Artwork section: TMDB posters, backdrops and logos merged with the media
  table, with in-library badges, language filter and add-to-library
- Record tmdb_path on downloaded media so TMDB images can be matched
- Recommendations by TMDB id for entries not in the library
2026-11-05 14:06:46 +00:00
X4Lo a9ff2d089a Store full TMDB data, add rate limiting and stale-entry refresh
Backend
- Route all TMDB requests through a rate limiter (20 req/s, 8 concurrent)
  with 429/5xx retries; stop logging the API key
- Fetch external ids, certification, keywords, videos, watch providers and
  alternative titles in the entry details request
- Shared entry mapper used by create, refresh, season refresh and importer
- New columns on entries, ids, ratings, seasons, episodes and people, with
  an idempotent startup migration (adds missing columns, widens types)
- Fix TV IMDb ids, network country/logo, episode tmdb_id on refresh, and
  genre/network removal on refresh
- Add stale-entries maintenance job (count, start, cancel) and live
  recommendations endpoint

Frontend
- Entry page: certification, tagline, creators, in-app trailer, vote count,
  TV/movie details, network logos, external links, keywords, where to
  watch, and recommendations
- Episode page: directors, writers and guest stars
- Settings: TMDB refresh card with live progress
2026-11-05 11:39:15 +00:00
X4Lo eb3a12f6cb Add Discovery Videos feature
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
2026-11-03 15:57:53 +00:00
X4Lo 4d88747649 Add season refresh, rating display, and actions dropdown to SeasonPage
Backend: Added PUT /seasons/:id/refresh endpoint that fetches updated
TMDB data for a single season.

Frontend:
- New SeasonRatingDialog for rating seasons via StarRating
- useRefreshSeason and useUpdateSeason hooks with query invalidation
- SeasonPage now shows inline season rating (user + TMDB)
- Mark Watched, Rate, and Refresh actions moved under a dropdown menu
2026-07-05 20:58:40 +01:00
X4Lo 63aca7e7b8 Add homepage-integration API endpoint
New GET /api/v1/homepage-integration endpoint exposes library stats
(totalEntries, library, libraryMovies, librarySeries, watchlist,
watchlistMovies, watchlistSeries, collections, favorits).
2026-06-30 23:58:26 +01:00
X4Lo ec9498cac0 Updated settings.json.example 2026-06-30 23:57:35 +01:00
X4Lo 0a79ee9768 Add named-token auth support to middleware and configService
authMiddleware now falls back to checking named tokens from settings
when JWT verification fails. configService.getNamedTokens() filters by
endDate, skipping expired tokens. Tokens without an endDate never expire.
2026-06-30 23:54:04 +01:00
X4Lo c09f70054c Add type-level duplicate credit cleanup to maintenance
Pass 1 handles exact role-level dupes. Pass 2 detects same
person/entry/type with different roles and keeps the credit
with a meaningful role, deleting the empty one.
2026-06-29 02:23:31 +01:00
X4Lo ea91c6011a Fix credits linking for TV aggregate format in create and refresh
Handle TV aggregate_credits (roles/jobs arrays) in entry creation,
matching the clean logic already in refresh. Also fix director
detection to search jobs[] array for TV series in both paths.
2026-06-29 02:10:24 +01:00
X4Lo 331bbbb17c Increase credit character and job columns to TEXT
VARCHAR(500) still overflows for TV series with many
aggregate roles joined by semicolon
2026-06-25 23:28:54 +01:00
X4Lo d984210dd9 Add impossible seen dates maintenance endpoint
- Backend: fixImpossibleSeenDates scan/fix in maintenanceService
  detects movies with EntrySeen date before release_date, adds
  them to a "Movies with impossible seen date" collection
- Frontend: ImpossibleSeenDatesSection in SettingsPage with
  Scan and Fix buttons
- Updated API docs (Clients + Reference), cleaned up removed
  migrateSeenWith references
2026-06-25 21:38:31 +01:00
X4Lo e82b905886 Add Watch Buddies feature
- Created WatchBuddy model
- M:N junctions to EntrySeen/EpisodeSeen
  and Media relation for profile pictures
- Full CRUD + search + profile picture upload
- WatchBuddySelect multi-select with search and inline create, replaced
  all seen_with text inputs
- WatchBuddiesPage (grid) and WatchBuddyProfilePage (edit form,
  icon-based contacts, poster-grid watch history, monthly timeline)
2026-06-25 03:11:14 +01:00
X4Lo 4313a794ce Protect backend routes with JWT auth middleware 2026-06-23 04:14:51 +01:00
X4Lo b3a4eb9fde Add jsonwebtoken dependency 2026-06-23 04:12:03 +01:00
X4Lo 0042e7150c Add password-based auth with JWT and remember-me 2026-06-23 04:11:01 +01:00
X4Lo 89deb869ab Update .gitignore 2026-06-23 04:02:37 +01:00
X4Lo b001ee2240 Auto-upgrade TV status on watch, full-width layout, settings tabs
Marking episode/entry as watched now auto-upgrades TV series from
plan_to_watch/null to watching. Settings page uses tabs (General/Maintenance)
with 2-column grid. AppLayout container removed for full-width pages.
2026-06-23 03:53:22 +01:00
X4Lo cdbaedd7d0 Add watch status for TV series with UI and auto-fix
Added watch_status column to Entry model (plan_to_watch/watching/completed/
on_hold/dropped). Status pill on entry details page opens selection dialog.
Set Status in quick actions menu and EntryCard dropdown (TV only).
Status filter in Library filter popover. Maintenance auto-fix endpoint
that sets statuses based on watched episodes (excl. season 0).
2026-06-23 03:39:16 +01:00
X4Lo a5659cf4c8 Normalize to double quotes across all files with Prettier 2026-06-21 22:28:08 +01:00
X4Lo 3c089ee110 Add duplicate credits maintenance and fix dedup logic 2026-06-18 22:08:46 +01:00
X4Lo 5a0328a17f Director field, search, and collection improvements
Backend: Added director column to Entry model, set during creation and
refresh. Maintenance endpoint to scan/fix missing directors. Reverted
expensive credit JOIN in getAllEntries.

Frontend: @director: search prefix for Library and Watchlist. Director
rendered on EntryDetailsPage via useEntryCredits. Fixed home page cards
to link directly to EntryDetailsPage when entry is in library. Added
TmdbCastsPage for TMDB cast browsing. Persisted collection sort order
and gray-out-unseen toggle. Tooltip component now theme-aware.
2026-06-18 20:09:11 +01:00
X4Lo 702cd537d1 fix(ai-query): two-step query for recently-watched endpoints to avoid genre join row multiplication 2026-05-29 02:57:28 +01:00
X4Lo 0459a1b4bf fix(ai-query): correct model column names for EntryRating, Collection, Media 2026-05-29 02:45:53 +01:00
X4Lo 6b6e95e736 feat(ai-query): add AI query API scaffold with all 15 endpoints 2026-05-29 02:13:12 +01:00
Mohammed Abad 22d111ef71 fix(backend): include EpisodeSeen in season episodes and add entry credits endpoint
- Add getEntryCredits service method returning all cast + crew with People, ordered by cast_type, order, episode_count
- Add getEntryCredits controller method
- Add GET /entries/:id/credits route in entry.routes.js
- Include EpisodeSeen association in getSeasonEpisodes so seen dates are returned to frontend
2026-04-29 16:04:10 +01:00
Mohammed Abad 507cdbcff7 fix(backend): check local DB before returning TMDB person preview
- Return local_id in GET /people/tmdb/preview/:tmdbId if person exists in DB
- Prevents duplicate "Add to Library" prompts for already-saved people
2026-04-27 13:43:57 +01:00
Mohammed AbadandCopilot 6d676d803c feat(people): add pagination support to getAllPeople endpoint
Support optional page, limit, and search query params.
Returns { data, total, page, totalPages } when paginated,
plain array for backward compatibility.

Co-authored-by: Copilot <copilot@github.com>
2026-04-27 13:29:16 +01:00
Mohammed Abad 8aca121b10 fix: people details page not working for people that are not in db 2026-04-27 12:33:02 +01:00
Mohammed Abad 0329808562 Small fixes 2026-04-27 12:07:39 +01:00
Mohammed Abad ea143fb32a fix(backend): fetch credits in TMDB preview and fix collection fallback
- Add credits fetch to GET /entries/tmdb/preview/:type/:tmdbId endpoint
- Map cast/crew to Credit-like shapes in preview response
- Fall back to entry backdrops when collection has no backdrop
2026-04-27 11:48:47 +01:00
X4Lo 23bce5a681 Merge branch 'react-frontend' of https://github.com/X4Lo/Showy into react-frontend 2026-04-27 04:03:39 +01:00
Mohammed Abad 25b645a16f feat(backend): add TMDB preview endpoint for non-library entries
- Add GET /entries/tmdb/preview/:type/:tmdbId endpoint in entryController.js
- Fetch TMDB data via tmdbService.fetchEntryData() without persisting to DB
- Return normalized preview object with title, poster, genres, rating, season/episode counts
2026-04-27 04:03:02 +01:00
X4Lo e9bc8886d4 Minor changes
- Updated frontend credit type
- Updated sorting of entry credits in `getEntryById()`
2026-04-23 22:23:10 +01:00
Mohammed Abad ce01dc34fa feat(backend): fix credit duplicates, support multi-role TV credits, fix collection upload
- 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
2026-04-23 16:51:18 +01:00
X4Lo 72fd77ee01 Backend: Updated tmdb services endpoint to get tv series credits 2026-04-22 13:54:23 +01:00
Mohammed Abad a0d8ee0317 Backend: statistics accuracy filter and maintenance docs
- statisticsController: filter CouchDayChart data to accuracy='EXACT'
- Documented maintenance endpoints and statistics changes in docs-vault
2026-04-22 02:08:01 +01:00
X4Lo 1cc75a94ef backend: removed migrateAccuracyField() function as it was temporary. 2026-04-20 20:25:04 +01:00
Mohammed Abad 63fdc00ac2 feat: entry details overhaul, navigation, rating half-stars, library growth "all", accuracy field
- SeasonPage: add back navigation link to entry details page
- EpisodePage: add breadcrumb navigation back to entry and season pages
- EntryCard: non-library entries now open a details dialog on click with overview, rating, and add-to-library button
- EntryDetailsPage: move favorite and mark-watched buttons into grouped dropdown menu with separators
- EntryDetailsPage: add favorite badge (heart icon) on top-left of poster
- EntryDetailsPage: add "mark as watched" clickable text next to runtime for unwatched movies
- EntryDetailsPage: genre pills are now clickable links that navigate to library page with genre filter
- EntryDetailsPage: hide status pill for movies; show status as text next to release date for TV series
- EntryDetailsPage: add delete entry option in dropdown menu with confirmation dialog and redirect to library
- EntryDetailsPage: add TMDB and IMDb external links under poster using entry.entryIds
- EntryDetailsPage: group all dropdown actions by relevance (Watch/Rate, Organize, Manage, Danger) with separators
- RatingDialog: support half-star ratings (0.5 increments) with left/right click zones per star
- RatingDialog: fix clear rating button by syncing state on dialog open and using dedicated handleClear function
- LibraryGrowthChart: add "All" option to year selector (default) showing cumulative growth across all years
- Frontend: add SeenAccuracy type to types/index.ts, update API layers and hooks to support accuracy
- EntrySeenDialog: add Date Accuracy selector (Exact/Estimated/Unknown) with EXACT default
- EpisodeSeenEditDialog: add Date Accuracy selector, updated overrideSubmit signature
- SeasonPage: pass accuracy through bulk mark-all-watched flow
2026-04-20 01:24:55 +01:00
Mohammed Abad ebdef6ba6c **DB Models Changes**
- Backend: add accuracy field (ENUM: EXACT, ESTIMATED, UNKNOWN) to EntrySeen and EpisodeSeen models
- Backend: add migration in dataInitializer to add accuracy column, set existing to EXACT, set 2021-01-01 entry seens and 2020-01-01 episode seens to UNKNOWN
2026-04-20 01:24:19 +01:00
Mohammed Abad d28b4caa7e docs(react_frontend): add comprehensive documentation & AGENTS.md
- docs/README.md: overview and table of contents
- docs/tech_stack.md: full dependency inventory and design decisions
- docs/project_structure.md: directory tree with conventions
- docs/architecture.md: data flow, layer responsibilities, key patterns
- docs/routing.md: route table, code splitting, discover categories
- docs/state_management.md: Zustand stores and React Query conventions
- docs/api_layer.md: all API modules with endpoint mappings
- docs/components.md: layout, entries, collections, charts, dialogs, UI primitives
- docs/pages.md: all 16 pages with features and routes
- docs/styling.md: theming, CSS tokens, responsive breakpoints, animations
- AGENTS.md: architecture summary, code conventions, data flow, key files
2026-04-10 02:44:06 +01:00
Mohammed Abad 6bff2055b4 fix: season episode dialog, mark season watched, episode 404 handling
Seasons Page:
- Episode watch button now opens EpisodeSeenEditDialog instead of
  directly marking as watched, allowing date/seen-with input
- Added "Mark Season as Watched" button that sequentially marks all
  unwatched episodes in the season

Episode Page:
- Fixed UI not updating after deleting the last episode seen record;
  the backend returns 404 when no records exist for an episode, which
  caused the query to error instead of resolving to an empty array.
  The API layer now catches 404 and returns [] gracefully.
2026-04-03 17:49:16 +01:00
Mohammed Abad ab20a5e64f feat: multi-page improvements, bug fixes, and new features
Library:
- Exclude hidden entries from all/movies/tv/favorites tabs (only show in hidden tab)

Entry Details:
- Move favorite, mark watched, and more actions to top-right as icon-only buttons with tooltips
- Fix season card play button — marks next unwatched episode as seen

Seasons Page:
- Fix episode watch button (was a TODO stub, now calls createEpisodeSeen)

Episode Page:
- Fix UI not updating after deleting the last watch record — invalidate season episodes query on delete

Dashboard:
- Fix Top Genres 404 — was calling non-existent GET /statistics, now uses /statistics/watch-time
- Fix TopGenresChart genre counting (Genre objects were wrongly cast as strings)
- Add LibraryGrowthChart (cumulative titles added over time)
- Add MediaTypeChart (Movies vs TV Series donut chart)

Home Page:
- Add TrendingSlider hero at top of page with auto-advance, dots, and prev/next nav
- Fix slider prev/next buttons (stable callbacks via ref, plain buttons, reactive library state)
- Add debounce (400ms) to search input
- Add Top Rated section (movies & TV)
- Add Upcoming section (movies)
- Replace inline "More" expand with link to /discover/:category

Discover Page (new):
- Full-page TMDB browser per category (trending/popular/top-rated/upcoming)
- Movie/TV tab toggle
- IntersectionObserver infinite scroll

Calendar:
- Fix large season numbers — use season.season_number instead of season_id (DB primary key)

Backend:
- Add fetchTopRated() and fetchUpcoming() to tmdbService
- Add GET /entries/tmdb/top-rated/:type and /entries/tmdb/upcoming/movie routes
2026-04-02 03:29:54 +01:00
Mohammed Abad ae67663623 feat(dashboard): add recharts data visualizations
- Install recharts
- Add WatchActivityChart (AreaChart, movies + episodes/month, year filter)
- Add WatchTimeChart (stacked BarChart, hours/month, synced year filter)
- Add RatingsChart (BarChart, user ratings distribution 1–10, color ramp)
- Add TopGenresChart (horizontal BarChart, top 10 genres, type filter)
- Add CouchDayChart (BarChart, watch count by weekday, peak day highlight)
- Add GET /statistics/watch-weekday backend endpoint (DAYOFWEEK aggregation)
- Extend statisticsApi with getYearlyWatchCount, getYearlyWatchTime, getWatchdayDistribution
- Add useYearlyWatchCount, useYearlyWatchTime, useWatchdayDistribution hooks
- Wire all charts into DashboardPage with responsive two-column grid layout
2026-04-01 16:04:43 +01:00
Mohammed Abad 191f4d6aae fix(frontend): calendar thumbnail, episode delete confirm, mark-as-watched dialog
- CalendarPage: restore poster/still thumbnail (h-8 w-5) in episode items;
  add getTmdbPosterUrl import; extend EpisodeWithEntry type with poster_path
- EpisodeSeenEditDialog: add mode 'create'|'edit' support; record prop is now
  optional; create mode uses useCreateEpisodeSeen with today as default date
- EpisodePage: Mark as Watched button now opens EpisodeSeenEditDialog (create
  mode) instead of firing mutation directly; delete shows ConfirmDialog before
  deleting; remove unused useCreateEpisodeSeen import
2026-04-01 00:59:09 +01:00
Mohammed Abad 11eab03987 Backend:
- Enhance PeopleController with person credits and TMDB filmography endpoints;
- update episodeService to filter entries by showInCalendar;
- add fetchPersonCombinedCredits function in tmdbService
2026-04-01 00:07:41 +01:00
Mohammed Abad 236e6e06fb Backend: Add TMDB proxy routes and service methods for trending, popular, and search functionalities 2026-03-30 23:33:29 +01:00
Mohammed Abad b3ab69cc22 Backend: Added docs & AGENTS.md 2026-03-30 19:37:08 +01:00
X4Lo 4a1d2bc614 Backend: Implement async error handling wrapper and refactor entry and media controllers to use it 2026-03-30 17:25:46 +01:00