mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
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:
@@ -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",
|
||||
|
||||
@@ -11,6 +11,7 @@ export const MetadataProviderKey = {
|
||||
AUDNEXUS: "audnexus",
|
||||
COMICVINE: "comicvine",
|
||||
RANOBEDB: "ranobedb",
|
||||
KOBO: "kobo",
|
||||
} as const;
|
||||
|
||||
export interface ComicMetadataFields {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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> = {
|
||||
|
||||
Reference in New Issue
Block a user