mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user