feat(search): Library provenance filter (organic / all / search-only)
Replace the binary 'show search-discovered' toggle with a 3-way Source selector in the Library toolbar, so users can also see ONLY search-discovered videos — not just hide or mix them. Backend: feed param library_source = organic (default, hides via_search) | all (both) | search (only via_search), applied in scope=all. Strings in HU/EN/DE.
This commit is contained in:
parent
546be57963
commit
8b19faaed1
6 changed files with 57 additions and 33 deletions
|
|
@ -141,9 +141,9 @@ export interface FeedFilters {
|
|||
includeShorts: boolean;
|
||||
includeLive: boolean;
|
||||
show: string;
|
||||
// Library (scope "all") only: when set, also show videos that entered the catalog via a
|
||||
// live YouTube search. Default (falsy) hides that search-discovered "noise".
|
||||
showSearchDiscovered?: boolean;
|
||||
// Library (scope "all") only — provenance filter: "organic" (default) hides search-
|
||||
// discovered videos, "all" mixes them in, "search" shows only them. Ignored for "my".
|
||||
librarySource?: "organic" | "all" | "search";
|
||||
channelId?: string;
|
||||
channelName?: string;
|
||||
maxAgeDays?: number;
|
||||
|
|
@ -309,8 +309,8 @@ function filterParams(f: FeedFilters): URLSearchParams {
|
|||
if (f.dateTo) p.set("published_before", f.dateTo);
|
||||
if (f.minDuration != null) p.set("min_duration", String(f.minDuration));
|
||||
if (f.maxDuration != null) p.set("max_duration", String(f.maxDuration));
|
||||
// Only relevant in Library scope; the backend ignores it for "my". Default = hide.
|
||||
p.set("exclude_search_discovered", String(!f.showSearchDiscovered));
|
||||
// Only relevant in Library scope; the backend ignores it for "my". Default = hide search.
|
||||
p.set("library_source", f.librarySource ?? "organic");
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue