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
This commit is contained in:
1 parent
6aa57cbe71
commit
25b645a16f
13 files changed
+199
-10
No files matched your search
+30
-1
@@ -11,7 +11,7 @@ aliases:
|
||||
|
||||
# Stores
|
||||
|
||||
Zustand stores in `react_frontend/src/stores/`. Two stores managing client-side state.
|
||||
Zustand stores in `react_frontend/src/stores/`. Three stores managing client-side state.
|
||||
|
||||
---
|
||||
|
||||
@@ -96,3 +96,32 @@ Uses Zustand `persist` middleware:
|
||||
- Storage key: `showy-theme`
|
||||
- Stored in `localStorage`
|
||||
- On change: toggles `dark`/`light` class on `document.documentElement`
|
||||
|
||||
---
|
||||
|
||||
## useLibraryFiltersStore
|
||||
|
||||
> [!info] File: `stores/useLibraryFiltersStore.ts`
|
||||
|
||||
Persists [[Library|LibraryPage]] filter/search/sort state across navigation so filters survive when navigating to entry details and back.
|
||||
|
||||
### State
|
||||
|
||||
| Field | Type | Description |
|
||||
|---|---|---|
|
||||
| `activeTab` | `FilterTab` | `'all' \| 'movies' \| 'series' \| 'watchlist'` |
|
||||
| `search` | `string` | Search query |
|
||||
| `sortField` | `SortField` | `'title' \| 'date_added' \| 'release_date' \| 'rating'` |
|
||||
| `sortDir` | `SortDir` | `'asc' \| 'desc'` |
|
||||
| `filters` | `Filters` | `{ genre: string; status: string; year: string }` |
|
||||
|
||||
### Actions
|
||||
|
||||
| Action | Description |
|
||||
|---|---|
|
||||
| `setActiveTab(tab)` | Set active tab filter |
|
||||
| `setSearch(query)` | Set search query |
|
||||
| `setSortField(field)` | Set sort field |
|
||||
| `setSortDir(dir)` | Set sort direction |
|
||||
| `setFilters(filters)` | Set genre/status/year filters |
|
||||
| `clearFilters()` | Reset all filters to defaults |
|
||||
Reference in new issue
Block a user