- 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.
14 lines
317 B
TypeScript
14 lines
317 B
TypeScript
"use client";
|
|
|
|
import { useQuery } from "@tanstack/react-query";
|
|
import { api } from "@/lib/api";
|
|
import type { ConfigResponse } from "@/lib/types";
|
|
|
|
export function useConfig() {
|
|
return useQuery<ConfigResponse>({
|
|
queryKey: ["config"],
|
|
queryFn: () => api.config.get(),
|
|
staleTime: 5 * 60 * 1000,
|
|
});
|
|
}
|