feat(kobo): add manual KOReader book hash linking and unmatched tracking

When KOReader syncs progress or annotations, it identifies books by a document
hash. BookOrbit normally resolves this automatically, but some books cannot be
matched. This adds a tracking table for unmatched hashes and a UI to manually
link them to existing library books.

Closes #458
This commit is contained in:
neon
2026-07-02 00:32:02 +00:00
parent c48c4a0dad
commit a0dad23087
37 changed files with 15654 additions and 59 deletions
+41
View File
@@ -41,6 +41,7 @@ export interface KoreaderPluginTotals {
failedPositions: number;
pageStatEvents: number;
annotations: number;
unmatchedBooks: number;
}
export interface KoreaderSyncStatus {
@@ -66,6 +67,46 @@ export interface KoreaderBookSyncInfo {
fileModifiedSinceLastSync: boolean;
}
export interface KoreaderUnmatchedBook {
hash: string;
title: string | null;
authors: string | null;
lastOpen: number | null;
firstSeenAt: string;
lastSeenAt: string;
}
export interface KoreaderManualHashLink {
hash: string;
bookId: number;
bookFileId: number;
bookTitle: string | null;
bookAuthors: string[];
koreaderTitle: string | null;
koreaderAuthors: string | null;
koreaderLastOpen: number | null;
createdAt: string;
updatedAt: string;
}
export interface LinkKoreaderUnmatchedBookPayload {
bookId: number;
}
export interface LinkKoreaderUnmatchedBookResult {
hash: string;
bookId: number;
bookFileId: number;
}
export interface UpdateKoreaderManualHashLinkPayload {
bookId: number;
}
export interface UnlinkKoreaderManualHashLinkResult {
hash: string;
}
export interface CreateKoreaderCredentialsPayload {
username: string;
password: string;