mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
feat(metadata): store and write hardcover edition IDs
Adds hardcoverEditionId to the database schema and shared types, enabling it to be stored as first-class metadata. Updates the file metadata parsers and writers (EPUB, PDF, CBZ) to read and embed this ID, and exposes it in the frontend metadata editor. Closes #420
This commit is contained in:
@@ -70,6 +70,8 @@ export type BookCard = {
|
||||
publisher: string | null;
|
||||
pageCount: number | null;
|
||||
isbn13: string | null;
|
||||
hardcoverId?: string | null;
|
||||
hardcoverEditionId?: string | null;
|
||||
narrators: string[];
|
||||
tags: string[];
|
||||
collapsedSeries?: import("./series-collapse").CollapsedSeriesInfo;
|
||||
@@ -132,6 +134,7 @@ export type BookDetail = {
|
||||
seriesMemberships?: BookSeriesMembership[];
|
||||
rating: number | null;
|
||||
coverSource: "extracted" | "custom" | null;
|
||||
hardcoverEditionId: string | null;
|
||||
providerIds: ProviderIds;
|
||||
authors: { id: number; name: string; sortName: string | null }[];
|
||||
genres: string[];
|
||||
@@ -173,6 +176,7 @@ export type BookMetadataRefreshPreviewFields = {
|
||||
goodreadsId?: string | null;
|
||||
amazonId?: string | null;
|
||||
hardcoverId?: string | null;
|
||||
hardcoverEditionId?: string | null;
|
||||
openLibraryId?: string | null;
|
||||
itunesId?: string | null;
|
||||
audibleId?: string | null;
|
||||
|
||||
@@ -21,6 +21,7 @@ export const COMMON_PROVIDER_BOOK_FILE_WRITE_FIELDS = [
|
||||
"goodreadsId",
|
||||
"amazonId",
|
||||
"hardcoverId",
|
||||
"hardcoverEditionId",
|
||||
"openLibraryId",
|
||||
"ranobedbId",
|
||||
"koboId",
|
||||
@@ -74,6 +75,7 @@ export const BOOK_FILE_WRITE_FIELD_LABELS = {
|
||||
goodreadsId: "Goodreads ID",
|
||||
amazonId: "Amazon ID",
|
||||
hardcoverId: "Hardcover ID",
|
||||
hardcoverEditionId: "Hardcover edition ID",
|
||||
openLibraryId: "Open Library ID",
|
||||
ranobedbId: "RanobeDB ID",
|
||||
koboId: "Kobo ID",
|
||||
|
||||
@@ -40,6 +40,7 @@ export interface MetadataSeriesMembership {
|
||||
export interface MetadataCandidate {
|
||||
provider: MetadataProviderKey;
|
||||
providerId: string;
|
||||
hardcoverEditionId?: string;
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
authors?: string[];
|
||||
@@ -114,4 +115,5 @@ export interface MetadataSource {
|
||||
narrators: string[];
|
||||
durationSeconds: number | null;
|
||||
abridged: boolean | null;
|
||||
hardcoverEditionId: string | null;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ export const BOOK_METADATA_LOCK_FIELDS = [
|
||||
"goodreadsId",
|
||||
"amazonId",
|
||||
"hardcoverId",
|
||||
"hardcoverEditionId",
|
||||
"openLibraryId",
|
||||
"itunesId",
|
||||
"audibleId",
|
||||
@@ -82,6 +83,7 @@ export const BOOK_METADATA_LOCK_GROUPS: BookMetadataLockGroup[] = [
|
||||
"goodreadsId",
|
||||
"amazonId",
|
||||
"hardcoverId",
|
||||
"hardcoverEditionId",
|
||||
"openLibraryId",
|
||||
"itunesId",
|
||||
"audibleId",
|
||||
|
||||
Reference in New Issue
Block a user