From 18a5cf1de7320186b9206bc4b525cb7628351718 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 29 Sep 2026 15:43:55 +0800 Subject: [PATCH] feat(search): two-stage search, site search defaults, TMDB work page (SEARCH-2) The code for this change landed in ac47867 by accident (a parallel docs commit swept up the staged index); this empty commit records it. - Search first lists works (local ledger + TMDB, merged, local first) with library comparison (not collected / tracked / owned, slot satisfaction and gaps, downloading); /search scope=all no longer queries sites. Emby comparison via /inventory/media-servers, which now also accepts tmdbType + tmdbId. - "Search releases" on work cards and detail pages opens a site picker (default / all / chosen, remembered per browser) and calls /search/releases?entityId|tmdb&sites=; the server builds query terms (original title + year, translated title), caches per (site, term), and queues unresolved hits for identification with trigger=search. - site.search_default (migration 0048, default true) with toggles on site cards and the edit sheet; settings.search.defaultSiteMode. - GET /media/tmdb/{type}/{id} and /console/media/tmdb/:type/:id: TMDB info, seasons, local/Emby comparison; subscribe (form prefilled, entity created on save), search releases, create entity only. Subscribe is no longer offered in search results or the command palette, which now opens the work page. Requires rebuild/restart (migration runs on start). Co-Authored-By: Claude Opus 5.5