Repository navigation
Add Unraid Docker image publishing and import improvements - #1
Merged
Merged
Conversation
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
The repo treats IDE0005 (unnecessary usings) as build errors. 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Import match threshold setting
ImportMatchThresholdconfig option (default 0.6, range 0.0–1.0)CloseAlbumMatchSpecificationreads threshold from config instead of hardcoded valueRemote book context for completed downloads
CompletedDownloadServiceandDownloadedBooksCommandServicenow buildIdentificationOverridesfromTrackedDownload.RemoteBook(Author + single Book when available)DownloadedBooksImportService.ProcessPathacceptsIdentificationOverridesinstead ofAuthorUnraid Docker image publishing
.github/workflows/publish-unraid-image.ymltriggered on develop pushes and manual dispatchMETADATA_URL=https://hardcover.bookinfo.pro,HARDCOVER=true)ghcr.io/edlaughton/bookshelf:import-match-threshold-uiTest plan