feat(library): add media library browsing functionality

- Introduced new `library` module in the API routes to handle media library requests.
- Enhanced `AppState` to include a media provider for library interactions.
- Defined new `IMediaProvider` trait methods for listing collections, series, and genres.
- Implemented Jellyfin media provider methods for fetching collections and series.
- Added frontend components for selecting series and displaying filter previews.
- Created hooks for fetching collections, series, and genres from the library.
- Updated media filter to support series name and search term.
- Enhanced API client to handle new library-related endpoints.
This commit is contained in:
2026-03-12 02:54:30 +01:00
parent f069376136
commit bf07a65dcd
14 changed files with 1005 additions and 86 deletions

View File

@@ -12,6 +12,38 @@ export interface MediaFilter {
min_duration_secs?: number | null;
max_duration_secs?: number | null;
collections: string[];
/** Filter by TV series name, e.g. "iCarly". Use with Sequential strategy. */
series_name?: string | null;
/** Free-text search, used for library browsing only. */
search_term?: string | null;
}
// Library browsing
export interface CollectionResponse {
id: string;
name: string;
collection_type?: string | null;
}
export interface SeriesResponse {
id: string;
name: string;
episode_count: number;
genres: string[];
year?: number | null;
}
export interface LibraryItemResponse {
id: string;
title: string;
content_type: ContentType;
duration_secs: number;
series_name?: string | null;
season_number?: number | null;
episode_number?: number | null;
year?: number | null;
genres: string[];
}
export interface RecyclePolicy {