feat: add local files provider with indexing and rescan functionality
- Implemented LocalFilesProvider to manage local video files. - Added LocalIndex for in-memory and SQLite-backed indexing of video files. - Introduced scanning functionality to detect video files and extract metadata. - Added API endpoints for listing collections, genres, and series based on provider capabilities. - Enhanced existing routes to check for provider capabilities before processing requests. - Updated frontend to utilize provider capabilities for conditional rendering of UI elements. - Implemented rescan functionality to refresh the local files index. - Added database migration for local files index schema.
This commit is contained in:
@@ -142,6 +142,11 @@ export const api = {
|
||||
},
|
||||
},
|
||||
|
||||
files: {
|
||||
rescan: (token: string) =>
|
||||
request<{ items_found: number }>("/files/rescan", { method: "POST", token }),
|
||||
},
|
||||
|
||||
schedule: {
|
||||
generate: (channelId: string, token: string) =>
|
||||
request<ScheduleResponse>(`/channels/${channelId}/schedule`, {
|
||||
|
||||
@@ -82,8 +82,22 @@ export interface ScheduleConfig {
|
||||
|
||||
// Config
|
||||
|
||||
export type StreamingProtocol = "hls" | "direct_file";
|
||||
|
||||
export interface ProviderCapabilities {
|
||||
collections: boolean;
|
||||
series: boolean;
|
||||
genres: boolean;
|
||||
tags: boolean;
|
||||
decade: boolean;
|
||||
search: boolean;
|
||||
streaming_protocol: StreamingProtocol;
|
||||
rescan: boolean;
|
||||
}
|
||||
|
||||
export interface ConfigResponse {
|
||||
allow_registration: boolean;
|
||||
provider_capabilities: ProviderCapabilities;
|
||||
}
|
||||
|
||||
// Auth
|
||||
|
||||
Reference in New Issue
Block a user