fix(metadata): extract and write back comicvine id for comics (#842)

* fix(metadata): extract and write back comicvine id for comics

ComicVine references were never read from a comic's embedded
ComicInfo.xml on import, even though every other provider id
(Goodreads, Amazon, Hardcover, Google Books, OpenLibrary, Kobo)
already round-trips through the same <Web>/Notes fields. This
affected Book Dock import, direct upload, and library scanning
alike, since they share the same extractor. Write-back had the
same gap: a comicvineId resolved via search/auto-fill was never
persisted back into the file.

Closes #840

* fix(metadata): keep comicvine id off the contested Web slot and source-check notes

ComicInfo has a single Web element and buildComicInfoXml writes the first
provider id in COMIC_INFO_PROVIDER_ID_KEYS order into it. The other six
providers are also in COMIC_INFO_MANAGED_NOTES_KEYS, so losing that slot costs
them nothing; comicvineId had no second channel, so a write-back for a book
that also carried a goodreads/amazon/hardcover/google/openlibrary/kobo id
dropped the id from the file entirely and clobbered any ComicVine URL that was
already there. Add comicvineId to the managed notes keys, which also makes the
existing managed-note read precedence reachable from our own writes.

ComicTagger emits "[Issue ID N]" for whichever talker produced the tag, naming
the source separately as "using info from <source>". Matching the bare marker
attributed Metron and other non-ComicVine issue ids to ComicVine and wrote them
back out as fabricated comicvine.gamespot.com URLs. Require the Comic Vine
source in the same sentence.

Also anchor the Web URL scan to a path segment so a segment ending in 4000-,
such as "14000-777", is no longer read as an issue id.

---------

Co-authored-by: neon <18559658+neonsolstice@users.noreply.github.com>
This commit is contained in:
Gideon VanRiette
2026-07-30 19:31:27 -05:00
committed by GitHub
parent 5cea03799e
commit 4baad41ed1
13 changed files with 194 additions and 2 deletions
+2
View File
@@ -31,6 +31,7 @@ export const COMMON_PROVIDER_BOOK_FILE_WRITE_FIELDS = [
] as const;
export const COMIC_BOOK_FILE_WRITE_FIELDS = [
"comicvineId",
"comicIssueNumber",
"comicVolumeName",
"comicPencillers",
@@ -84,6 +85,7 @@ export const BOOK_FILE_WRITE_FIELD_LABELS = {
koboId: "Kobo ID",
lubimyczytacId: "LubimyCzytac ID",
aladinId: "Aladin ID",
comicvineId: "ComicVine ID",
comicIssueNumber: "Issue number",
comicVolumeName: "Volume",
comicPencillers: "Pencillers",