fix(books): clear reading progress and history when resetting book

Provide a new endpoint and user interface to reset the reading state of a book. Delete all related reading sessions, progress, audiobook progress, and KOReader progress. Clear lifecycle dates when setting the book status back to unread or want to read, preventing the book from persisting on the continue reading shelf.

Closes #606
This commit is contained in:
neon
2026-07-09 21:54:18 +00:00
parent 5541e1acdc
commit 0f37e197ad
23 changed files with 1245 additions and 34 deletions
+1
View File
@@ -53,6 +53,7 @@ export enum AuditAction {
BookBulkUpdateTags = "book.bulk.update_tags",
BookBulkSetMetadataLock = "book.bulk.set_metadata_lock",
BookBulkEditMetadata = "book.bulk.edit_metadata",
BookReadingStateReset = "book.reading_state.reset",
BookWriteAndRename = "book.write_and_rename",
+4
View File
@@ -30,6 +30,10 @@ export type UserBookStatus = {
updatedAt: string;
};
export type ResetBookReadingStateResponse = {
readStatus: UserBookStatus;
};
export type BookFileRef = {
id: number;
format: string | null;