Skip to content

Add Unraid Docker image publishing and import improvements - #1

Merged
EdLaughton merged 9 commits into
developfrom
claude/publish-unraid-image-GefjL
Mar 15, 2026
Merged

EdLaughton merged 9 commits into
developfrom
claude/publish-unraid-image-GefjL

Conversation

@EdLaughton

Copy link
Copy Markdown
Owner

Summary

Changes

Import match threshold setting

  • New ImportMatchThreshold config option (default 0.6, range 0.0–1.0)
  • UI slider in Settings > Media Management
  • CloseAlbumMatchSpecification reads threshold from config instead of hardcoded value
  • Unit tests for the threshold behavior

Remote book context for completed downloads

  • CompletedDownloadService and DownloadedBooksCommandService now build IdentificationOverrides from TrackedDownload.RemoteBook (Author + single Book when available)
  • DownloadedBooksImportService.ProcessPath accepts IdentificationOverrides instead of Author
  • Multi-book/omnibus downloads fall back to author-only scoping; null RemoteBook preserves existing behavior
  • 4 new tests covering single-book, multi-book, null, and empty-books scenarios

Unraid Docker image publishing

  • New .github/workflows/publish-unraid-image.yml triggered on develop pushes and manual dispatch
  • Builds Hardcover variant (METADATA_URL=https://hardcover.bookinfo.pro, HARDCOVER=true)
  • Publishes to ghcr.io/edlaughton/bookshelf:import-match-threshold-ui

Test plan

  • Verify import match threshold slider appears in Settings > Media Management
  • Verify changing threshold affects book matching sensitivity during import
  • Verify completed downloads with specific book context match correctly
  • Verify multi-book grabs still fall back to author-scoped matching
  • Verify Unraid Docker workflow runs and publishes image on develop push

claude added 9 commits March 15, 2026 20:47
Replace the hard-coded 0.50 distance threshold in CloseBookMatchSpecification
with a user-configurable setting (BookImportMinimumMatchPercent).

- Add BookImportMinimumMatchPercent to IConfigService/ConfigService (default: 50)
- Add to MediaManagement API resource with validation (range: 50-99)
- Wire into CloseBookMatchSpecification: threshold = 1.0 - (percent / 100.0)
- Add UI field in Media Management > Importing section
- Add localization keys for label and help text
- Add unit tests for threshold conversion and behavior

Default behavior is preserved: 50% minimum match = 0.50 internal threshold.

https://claude.ai/code/session_01976eMqb4mwazHh13NZkDY5
Completed-download import previously discarded specific book context
from TrackedDownload.RemoteBook and only passed Author into the
identification pipeline. This forced a fuzzy re-identification among
all books by that author, causing mis-matches for similar titles
(e.g. issue #3 vs issue pennydreadful#6 of the same series).

Now, when a completed download was grabbed for a specific single book,
that book context is threaded through IdentificationOverrides into
CandidateService, which already supports Book-level candidate
restriction. Multi-book/omnibus downloads fall back to author-only
scoping. Null RemoteBook preserves existing behavior exactly.

Changes:
- CompletedDownloadService.Import: build IdentificationOverrides from
  RemoteBook (Author + single Book when available)
- DownloadedBooksCommandService: same override building for external
  scan commands
- DownloadedBooksImportService: accept IdentificationOverrides instead
  of Author, thread through ProcessFolder/ProcessFile
- Tests: update existing mocks, add 4 new tests covering single-book,
  multi-book, null-remote, and empty-books override scenarios

https://claude.ai/code/session_01976eMqb4mwazHh13NZkDY5
Add a dedicated workflow that builds this feature branch and publishes
a Docker image to ghcr.io/edlaughton/bookshelf:import-match-threshold-ui
for testing on Unraid.

Triggers on push to this branch and manual dispatch. Uses the repo's
existing build.sh and docker/Dockerfile. Targets linux/amd64 only.

https://claude.ai/code/session_01976eMqb4mwazHh13NZkDY5
Pass METADATA_URL and HARDCOVER build-args to match the main
build workflow's Hardcover configuration.

https://claude.ai/code/session_01976eMqb4mwazHh13NZkDY5
Both feature branches are being merged into develop, so the workflow
trigger should point there instead of the individual feature branch.

https://claude.ai/code/session_01976eMqb4mwazHh13NZkDY5
Use (100 - percent) / 100.0 instead of 1.0 - (percent / 100.0) to avoid
IEEE 754 imprecision where 1.0 - 0.9 = 0.09999999999999998 instead of 0.1.

https://claude.ai/code/session_01976eMqb4mwazHh13NZkDY5
Avoid testing exact floating-point boundary (0.1 == 0.1) since
0.3 / 3.0 produces 0.10000000000000002 due to IEEE 754 imprecision.
Use 0.09 (clearly below threshold) instead.

https://claude.ai/code/session_01976eMqb4mwazHh13NZkDY5
@EdLaughton
EdLaughton merged commit 8f45f7e into develop Mar 15, 2026
1 check passed
@EdLaughton
EdLaughton deleted the claude/publish-unraid-image-GefjL branch March 15, 2026 23:21
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