Adds Komga sync feature to import read status from a Komga server. Books are matched by title (case-insensitive) with series+title primary match and title-only fallback. Sync reports are persisted with matched, newly marked, and unmatched book lists. UI shows check icon for newly marked books, sorted to top. Credentials (URL+username) are saved between sessions. Uses HashSet for O(1) lookups to handle large libraries. Closes #2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
11 lines
399 B
SQL
11 lines
399 B
SQL
CREATE TABLE IF NOT EXISTS komga_sync_reports (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
komga_url TEXT NOT NULL,
|
|
total_komga_read BIGINT NOT NULL DEFAULT 0,
|
|
matched BIGINT NOT NULL DEFAULT 0,
|
|
already_read BIGINT NOT NULL DEFAULT 0,
|
|
newly_marked BIGINT NOT NULL DEFAULT 0,
|
|
unmatched JSONB NOT NULL DEFAULT '[]',
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|