fix(jellyfin): scope global search to visible libraries
Jellyfin search rows do not expose their owning collection, so hidden libraries cannot be filtered after the response. Scope searches to visible libraries, stamp the returned rows, reuse the latest loaded views, propagate cancellation, and fail closed when views cannot be loaded. Keep full candidate budgets and split music libraries into parallel album, audio, and artist requests. Album requests disable UserData and use the existing album field set to avoid recursive per-album work from #1552; audio requests retain cheap leaf play state. close #1770
This commit is contained in:
@@ -272,7 +272,18 @@ abstract class MediaServerClient {
|
||||
/// candidate budget; a backend may supplement omitted media categories and
|
||||
/// return more candidates for cross-server ranking. [abort] cancels every
|
||||
/// backend request owned by this search pass.
|
||||
Future<List<MediaItem>> searchItems(String query, {int limit = 100, AbortController? abort});
|
||||
///
|
||||
/// [excludedLibraryIds] names server-local libraries the user has hidden. A
|
||||
/// backend whose search rows carry a library id may ignore it, because the
|
||||
/// caller drops those rows by id. A backend whose rows cannot be attributed
|
||||
/// to a library MUST scope the request server-side instead — the caller has
|
||||
/// nothing to filter on.
|
||||
Future<List<MediaItem>> searchItems(
|
||||
String query, {
|
||||
int limit = 100,
|
||||
AbortController? abort,
|
||||
Set<String> excludedLibraryIds = const {},
|
||||
});
|
||||
|
||||
/// Items the user has started but not finished. Plex calls this "On Deck"
|
||||
/// internally; the neutral name matches the Continue Watching UI surface.
|
||||
|
||||
Reference in New Issue
Block a user