feat: report skipped duplicates in the upload tray

A book whose files were all already stored settles as skipped rather than done,
naming the book that holds them and offering to add it anyway.
This commit is contained in:
2026-08-13 17:23:57 -04:00
parent d78b21c27f
commit b124a65d6e
7 changed files with 302 additions and 58 deletions
+9
View File
@@ -6,6 +6,15 @@ export type Book = components['schemas']['BookRead'];
export type BookFile = components['schemas']['FileMetadataRead'];
export type BookProgress = components['schemas']['BookProgressRead'];
/**
* A file the library already held, so the upload did not store it again.
*
* `book_id` is null when the match was another file in the same upload — there is
* no book to point at yet.
*/
export type DuplicateFile = components['schemas']['DuplicateFileRead'];
export type BooksUploadResult = components['schemas']['BooksUploadResult'];
export const bookQuerySchema = commonQuerySchema.extend({
libraries: stringArrayCoerce,
authors: stringArrayCoerce,