Skip to content

fix: write ComicVine issue links and creators consistently in ComicInfo - #159

Open
bbutlerau wants to merge 2 commits into
pullboxapp:developfrom
bbutlerau:fix/comicinfo-comicvine-issue-links
Open

bbutlerau wants to merge 2 commits into
pullboxapp:developfrom
bbutlerau:fix/comicinfo-comicvine-issue-links

Conversation

@bbutlerau

Copy link
Copy Markdown

Summary

Files imported for catalog-sourced issues are written without a Web entry in ComicInfo.xml, even though Pullbox knows the issue's ComicVine id (it writes it to Notes). Readers such as Komga only pick the ComicVine link up from Web, so those books end up unlinked there. On my library that was 188 tracked issues across 19 series, all with comicvine_id set and comicvine_url null.

Separately, Mass Convert's "embed ComicInfo" step builds its own smaller payload, so re-embedding a file cannot add the link, the cv id note or creator credits that the import path writes for the same issue.

Related Issues

None filed. Happy to open one if you prefer an issue first.

Changes

  • Add comicvine_issue_url() in core/comicvine_links.py: returns the stored link when there is one, otherwise derives https://comicvine.gamespot.com/issue/4000-<id>/ from the issue id (the same form ui/import_review_tables.py and services/catalog/reader.py already build).
  • Use it for Web in both build_comicinfo_payload_for_issue implementations (core/library_comicinfo.py and services/import_file_preparation.py).
  • Mass Convert: include Web, the [cv_vol_id:…] [cv_issue_id:…] note and the stored creator fields for tracked files, in the library scope and the manual/folder scopes.

Behaviour is unchanged for issues that have a stored link, and for provisional issues with no ComicVine id (Web stays empty).

Checklist

  • Tests pass locally for the touched areas (tests/unit/test_comicvine_links.py, test_exact_issue_artifacts.py, test_library_comicinfo.py, test_import_file_preparation.py, tests/utilities/test_mass_convert_pipeline.py). The four new tests fail on develop without the change.
  • Lint clean (ruff check src/ tests/)
  • Type check clean (mypy --strict src/pullbox/): clean for the files touched here. My local environment reports 42 errors on an untouched develop as well, which looks like dependency drift on my side (SQLAlchemy 2.1.1, mypy 2.4.0), so I am relying on CI for this one.
  • Format clean (ruff format --check src/ tests/)
  • New code has test coverage
  • Documentation updated (not applicable)
  • Commit messages use documented conventional prefixes
  • CHANGELOG.md updated: left for release prep, per the contributing guide

Local note: in my container the full tests/unit + tests/utilities run has about 16 failing or intermittent tests in test_import_file_execution.py, test_import_service.py and test_import_job_controls.py, with and without this change. I have not investigated those.

Screenshots

No UI changes.

🤖 Generated with Claude Code

bbutlerau and others added 2 commits October 2, 2026 09:25
Issues created from catalog data carry a ComicVine id but no stored page
link, so files imported for them were written without a Web entry even
though the id was known. Readers such as Komga only surface the link from
Web, which left those files unlinked.

Fall back to the canonical /issue/4000-<id>/ page whenever no fetched
link is stored. A stored link is still used unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E9gUFQEryh4gDJRKvjNUZM
The mass convert metadata step built its own, smaller ComicInfo payload:
no Web link, no ComicVine id note and no creator credits. Re-embedding a
tracked file therefore could not add what the import path writes for the
same issue.

Include the Web link, the cv id note and the stored creator fields for
tracked files in both the library and manual/folder scopes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E9gUFQEryh4gDJRKvjNUZM
@DeusExTaco

Copy link
Copy Markdown
Contributor

@bbutlerau
Thanks for digging into this. The missing ComicVine links and creator credits are real issues, and I’d like to get them addressed. I think this belongs with the v2.0 metadata-writing work, though, so I’m going to hold off on merging it for now.
One thing I found that needs changing: Mass Convert now queries creators separately for every tracked file, even when the metadata step is disabled. With 16 files, I got 18 SELECTs versus 2 before this change. That will add up pretty quickly on larger libraries.
Could you update this to batch the creator lookups and skip them when the metadata step isn’t enabled? Please add a query-count regression test too, then bring the branch up to date with develop so I can review it alongside the current metadata-writing changes.
The direction is good—I just want to get the performance and integration details squared away before taking it into v2.0.

@bbutlerau

Copy link
Copy Markdown
Author

No worries, I'll hold off until the 2.0 metadata stuff is going if you want.
Im really liking Pullbox, im just getting my local Claude to fix issues (probably due to my own needs) and thought I should share them. Just being honest up front that I’m heavily leaning on Claude Code for these as im only just relearning coding since my C++ days at uni.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants