feat(metadata): add Kobo metadata provider

Add Kobo as a first-class metadata source so books can keep Kobo IDs across fetch, edit, import, scoring, and file-write flows. Provide the Python cloudscraper setup needed for production fetches while keeping local setup explicit.

Closes #247
This commit is contained in:
neon
2026-06-05 17:59:53 +00:00
parent 81e0531ece
commit 329d1b6643
96 changed files with 12509 additions and 29 deletions
+2
View File
@@ -23,6 +23,7 @@ export const COMMON_PROVIDER_BOOK_FILE_WRITE_FIELDS = [
"hardcoverId",
"openLibraryId",
"ranobedbId",
"koboId",
] as const;
export const COMIC_BOOK_FILE_WRITE_FIELDS = [
@@ -73,6 +74,7 @@ export const BOOK_FILE_WRITE_FIELD_LABELS = {
hardcoverId: "Hardcover ID",
openLibraryId: "Open Library ID",
ranobedbId: "RanobeDB ID",
koboId: "Kobo ID",
comicIssueNumber: "Issue number",
comicVolumeName: "Volume",
comicPencillers: "Pencillers",
+1
View File
@@ -11,6 +11,7 @@ export const MetadataProviderKey = {
AUDNEXUS: "audnexus",
COMICVINE: "comicvine",
RANOBEDB: "ranobedb",
KOBO: "kobo",
} as const;
export interface ComicMetadataFields {
+2 -1
View File
@@ -24,6 +24,7 @@ export const BOOK_METADATA_LOCK_FIELDS = [
"openLibraryId",
"itunesId",
"audibleId",
"koboId",
"comicvineId",
"ranobedbId",
"comicIssueNumber",
@@ -74,7 +75,7 @@ export const BOOK_METADATA_LOCK_GROUPS: BookMetadataLockGroup[] = [
{
key: "providers",
label: "Provider IDs",
fields: ["googleBooksId", "goodreadsId", "amazonId", "hardcoverId", "openLibraryId", "itunesId", "audibleId", "comicvineId", "ranobedbId"],
fields: ["googleBooksId", "goodreadsId", "amazonId", "hardcoverId", "openLibraryId", "itunesId", "audibleId", "koboId", "comicvineId", "ranobedbId"],
},
{
key: "comic",
@@ -109,6 +109,12 @@ export interface ComicVineProviderConfig {
apiKey: string;
}
export interface KoboProviderConfig {
enabled: boolean;
country: string;
language: string;
}
export interface ProviderConfigurations {
google: GoogleProviderConfig;
amazon: AmazonProviderConfig;
@@ -120,6 +126,7 @@ export interface ProviderConfigurations {
audnexus: AudnexusProviderConfig;
comicvine: ComicVineProviderConfig;
ranobedb: SimpleProviderConfig;
kobo: KoboProviderConfig;
}
export interface ProviderStatus {
+3 -1
View File
@@ -20,7 +20,8 @@ export type MetadataScoreField =
| "amazonId"
| "hardcoverId"
| "openLibraryId"
| "itunesId";
| "itunesId"
| "koboId";
export type MetadataScoreGroup = "core" | "publishing" | "classification" | "enrichment" | "providers";
@@ -53,6 +54,7 @@ export const METADATA_SCORE_FIELDS: Record<MetadataScoreField, MetadataScoreFiel
hardcoverId: { group: "providers", label: "Hardcover ID", defaultWeight: 1 },
openLibraryId: { group: "providers", label: "Open Library ID", defaultWeight: 1 },
itunesId: { group: "providers", label: "iTunes ID", defaultWeight: 1 },
koboId: { group: "providers", label: "Kobo ID", defaultWeight: 1 },
};
export const METADATA_SCORE_GROUP_LABELS: Record<MetadataScoreGroup, string> = {