feat: implement thumbnail generation and management
- Remove unused image dependencies from Cargo.lock. - Update API to handle thumbnail generation and checkup processes. - Introduce new routes for rebuilding and regenerating thumbnails. - Enhance job tracking with progress indicators for thumbnail jobs. - Update front-end components to display thumbnail job status and progress. - Add backend logic for managing thumbnail jobs and integrating with the API. - Refactor existing code to accommodate new thumbnail functionalities.
This commit is contained in:
@@ -187,6 +187,24 @@ export async function rebuildIndex(libraryId?: string, full?: boolean) {
|
||||
});
|
||||
}
|
||||
|
||||
export async function rebuildThumbnails(libraryId?: string) {
|
||||
const body: { library_id?: string } = {};
|
||||
if (libraryId) body.library_id = libraryId;
|
||||
return apiFetch<IndexJobDto>("/index/thumbnails/rebuild", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
}
|
||||
|
||||
export async function regenerateThumbnails(libraryId?: string) {
|
||||
const body: { library_id?: string } = {};
|
||||
if (libraryId) body.library_id = libraryId;
|
||||
return apiFetch<IndexJobDto>("/index/thumbnails/regenerate", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
}
|
||||
|
||||
export async function cancelJob(id: string) {
|
||||
return apiFetch<IndexJobDto>(`/index/cancel/${id}`, { method: "POST" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user