feat: add rescan job type and improve full rebuild UX
Add "Deep rescan" job type that clears directory mtimes to force re-walking all directories, discovering newly supported formats (e.g. EPUB) without deleting existing data or metadata. Also improve full rebuild button: red destructive styling instead of warning, and FR description explicitly mentions metadata/reading status loss. Rename FR rebuild label to "Mise à jour". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -221,10 +221,11 @@ export async function listJobs() {
|
||||
return apiFetch<IndexJobDto[]>("/index/status");
|
||||
}
|
||||
|
||||
export async function rebuildIndex(libraryId?: string, full?: boolean) {
|
||||
const body: { library_id?: string; full?: boolean } = {};
|
||||
export async function rebuildIndex(libraryId?: string, full?: boolean, rescan?: boolean) {
|
||||
const body: { library_id?: string; full?: boolean; rescan?: boolean } = {};
|
||||
if (libraryId) body.library_id = libraryId;
|
||||
if (full) body.full = true;
|
||||
if (rescan) body.rescan = true;
|
||||
return apiFetch<IndexJobDto>("/index/rebuild", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(body),
|
||||
|
||||
Reference in New Issue
Block a user