feat(plex): field-scoped search (S2) + instant search typeahead
Add a search scope-pill to the Plex header search box (GitHub-style, one field-scope at a time) and an instant typeahead of the top matches below it. Backend (unified_library): - New `field` param: all | title | people | summary | episode. `all` is byte-identical to the pre-scope behaviour (untouched weighted search_vector); a specific field keeps the GIN `search_vector @@ tsq` prefilter AND ANDs a per-column tsvector recheck, so scoped hits are a strict subset of Everywhere. Per-field expressions mirror the search_vector Computed def (same TS config, same left(summary,1000) truncation). - `episode` scope empties the movie/show grid and title-only-matches the grouped Episodes section; the title/people/summary scopes suppress that section. - Unknown field falls back to `all`. New DB-lane characterization tests (test_plex_field_scoped_search.py): each scope narrows correctly, field=all is identical to today, episode empties the grid and needs shows in scope. Frontend: - PlexSearchBox wraps the shared SearchBar with the scope-pill (reusing ActionMenu) and the typeahead; SearchBar gains generic leading/below/focus/ keydown slots so other modules' search boxes are untouched. - Episode scope offered only when shows are in scope (movie-only hides it), healed at the point of use like the sort state. - Typeahead reuses /api/plex/library (limit=10), honours scope+field (not the sidebar filters), shows poster+title+year, keyboard nav (arrows/Enter/Esc), and jumps straight to a movie's info page or a show's drill-down via a new provider jumpTo hand-off (mirrors the playlistOpen pattern). - `field` persisted per-account; en/hu labels added.
This commit is contained in:
@@ -3,6 +3,17 @@
|
||||
"backToFeed": "YouTube feed",
|
||||
"backToLibrary": "Back to library",
|
||||
"searchPlaceholder": "Search Plex…",
|
||||
"searchField": {
|
||||
"aria": "Search scope",
|
||||
"all": "Everywhere",
|
||||
"title": "Titles",
|
||||
"people": "Cast & crew",
|
||||
"summary": "Descriptions",
|
||||
"episode": "Episodes"
|
||||
},
|
||||
"suggest": {
|
||||
"aria": "Search suggestions"
|
||||
},
|
||||
"sort": {
|
||||
"added": "Recently added",
|
||||
"title": "Title",
|
||||
|
||||
@@ -3,6 +3,17 @@
|
||||
"backToFeed": "YouTube feed",
|
||||
"backToLibrary": "Vissza a könyvtárhoz",
|
||||
"searchPlaceholder": "Keresés a Plexben…",
|
||||
"searchField": {
|
||||
"aria": "Keresési hatókör",
|
||||
"all": "Mindenhol",
|
||||
"title": "Címek",
|
||||
"people": "Szereplők",
|
||||
"summary": "Leírások",
|
||||
"episode": "Epizódok"
|
||||
},
|
||||
"suggest": {
|
||||
"aria": "Keresési javaslatok"
|
||||
},
|
||||
"sort": {
|
||||
"added": "Nemrég hozzáadott",
|
||||
"title": "Cím",
|
||||
|
||||
Reference in New Issue
Block a user