Skip to content

Add Javstash Autofill plugin#740

Open
suzuhiroruri wants to merge 1 commit into
stashapp:mainfrom
suzuhiroruri:plugin/javstash-autofill
Open

Add Javstash Autofill plugin#740
suzuhiroruri wants to merge 1 commit into
stashapp:mainfrom
suzuhiroruri:plugin/javstash-autofill

Conversation

@suzuhiroruri

Copy link
Copy Markdown

What this adds

plugins/javstashAutofill — a Performer.Create.Post hook that fills a newly-created performer's empty fields from a scraper (default: the javstash stash-box), using the best name-matching candidate (or skipping when there is no match).

Features

  • Best name match, or skip (configurable threshold).
  • Fill empty only by default — existing values, images and aliases are protected. Every field has an optional per-field overwrite toggle.
  • Primary-name policy per origin (Identify vs. manual, detected via stash_ids in the create input): keep the created name (scraper name → alias) or make the scraper's canonical name primary (created name → alias).
  • Duplicate merge: when the scraper name would become primary but a same-named performer already exists, the new one is merged into it via performerMerge (scenes re-linked, created name kept as alias, stash-box id carried over).
  • Measurements normalisation (91H-56-8891(H)-56-88).
  • Asynchronous image — the image is fetched and set in a detached process so the hook returns immediately and Stash never blocks on a slow remote image fetch.

Configurable source (stash-box endpoint or scraper_id), separately for Identify and manual creation. Standard library only.

Validation

  • node ./validate.js --ciValidation passed.
  • Manually tested on a live Stash (native macOS build) against the javstash stash-box: empty-fill, per-field overwrite, keep-created-name vs. use-scraper-name for both origins, duplicate merge (stash_id + aliases carried over), and asynchronous image setting. Test performers were removed afterwards.

LLM-assisted contribution disclosure

Per the repository's LLM policy: this plugin was written with LLM assistance (Claude). The code was human-reviewed and human-tested/validated on a live instance, and I take full responsibility for it (including license compliance).

Fills a newly-created performer's empty fields from a scraper (default javstash)
on Performer.Create.Post: best name match or skip, per-origin (Identify/manual)
source and primary-name policy, duplicate merge, per-field overwrite toggles,
measurements normalisation, and asynchronous image setting.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant