Repository navigation
Add Image Matcher plugin - #819
Open
speckofthecosmos wants to merge 2 commits into
Open
speckofthecosmos wants to merge 2 commits into
speckofthecosmos wants to merge 2 commits into
Conversation
A UI plugin that finds look-alike images by perceptual hash and lets the user merge them into one image (every file kept), delete the lesser copies, or handle a whole folder pair in one decision. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…screen - Stash deletes a file by renaming it to <name>.delete first (stashapp/stash#3664), so a name over 248 bytes cannot be deleted and one such file failed the whole delete. Delete now leaves those copies alone, labels them beforehand, and points to merge. - Delete works on an image that holds several files; its card lists every folder they are in, and warnings and results give the true file count. - Results show in a bar fixed to the bottom of the screen, so they are seen wherever the button was. - Choosing another copy to keep no longer leaves the old kept copy out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Got tired of seeing all the dupes in my library and not being able to catch them but very occasionally. Put together an interface and used it on my own library. Pulled ideas from several other image matching projects.
Claude Fable 5.2 (medium)
Adds
plugins/image-matcher, a UI plugin (no Python, no dependencies) that finds images that look the same and lets you act on them. Related: stashapp/stash#1867 (image duplicate checker request) and the closed stashapp/stash#6675.Behavior (what this adds for users)
/image-matcher, opened from a top-bar button, with two tabs:How merge works
Stash has no image-merge mutation. The plugin does not write to the database:
fileSetFingerprintsputs the same custom fingerprint (typeimagematch) on the kept image's files and the other image's files.imagesDestroyremoves the other image record withdelete_file: false.metadataScanon those files: the scanner attaches a file that has no image to the image sharing a fingerprint.Because the scanner matches on any fingerprint, the file's phash is set aside during the rescan and restored once the file has landed.
Implementation notes (open to revision)
imcore.js(pure logic),imops.js(GraphQL operations),imui.js(the React page viaPluginApi)./plugin/, because Stash serves plugin assets there and a refresh would 404.image-matcher; happy to rename to the repository's preferred style.url:points at this folder; I can change it to a forum topic.Testing
validator/validate.js --cipasses.Limits
LLM-assisted contribution
Written with Claude Code (an LLM) under the author's direction, per this repository's rule for LLM-assisted contributions. The author specified the behaviour, used it on a real library, and looked over the code. An LLM code review was also run over the whole plugin and its ten findings are fixed in this version. The author takes responsibility for the code.
🤖 Generated with Claude Code