| Summary | Automatic studio cleanup with zero UI. A studio created on the fly is scraped from your configured Stash-box instances, then merged into an existing duplicate or filled in-place. A manual task sweeps every studio that has no Stash ID. Raw Python plugin — no page injection, no CSS. | |
| Repository | https://github.com/k6cc/stash-jav-tools/tree/main/studioToolsBackend | |
| Source URL | https://k6cc.github.io/stash-plugins/plugins/main/index.yml | |
| Install | How to install a plugin? |
Hi stashers,
The UI plugin Studio Tools gives you a merge dialog and a multi-source search panel. If you would rather have duplicates and missing info fixed by themselves — hook, scrape, merge, done — this is the headless twin.
What it does
- Hook (automatic): on
Studio.Create.Post, the new studio is scraped from your configured Stash-box instances in priority order. Normalized-exact match only — the first source that hits wins; failures and no-hits fall back per the silent-fallback setting. If the canonical name already exists (name or alias), the new studio is merged into it; otherwise empty fields are filled in-place, the canonical name is kept as an alias, and the image is set asynchronously in a subprocess. - Task (manual): “Scan Studios Without Stash IDs” sweeps studios missing the first-priority source’s Stash ID through the same pipeline — the backlog of studios created before the plugin existed. Run it once after installing; the hook covers everything after.
Stash has no native studio merge, so the merge re-implements the UI version’s flow: content references are transferred, the target’s empty fields are filled, the source is deleted. Everything is logged to studio_tools_backend.log in the plugin directory, mirrored to the Stash log.
Settings
| Setting | Default | What it does |
|---|---|---|
| Source priority | empty = all configured | Comma-separated scrape order, the list is the switch: built-in keys javstash / stashdb / theporndb, custom instances by endpoint URL. Empty uses all configured instances (javstash → stashdb → theporndb → custom in provider order); unlisted and locally unconfigured instances are skipped |
| Silent fallback | ON | ON: a failing or non-matching source falls back to the next; OFF: the first responding source decides — no exact match means the studio is skipped |
| Timeout per source (s) | 8 | Per-source scrape timeout |
Notes
- Needs Python (Stash’s built-in runtime; stdlib only) and at least one Stash-box instance configured under Settings → Metadata Providers.
- Merging deletes the duplicate studio — references are transferred, but back up before the first full scan (Settings → Tasks → Backup).
- Only empty fields are filled; existing values, ratings and manually curated fields are never overwritten.
- The image is fetched by the plugin and passed to Stash as base64 — the hook never blocks on image downloads.
Install
- Download the latest
studioToolsBackend-vX.Y.Z.zipfrom Releases - Unzip into your Stash plugins directory (files go directly in the
studioToolsBackendfolder) - Stash → Settings → Plugins → Reload plugins
Or install from the unified source (https://k6cc.github.io/stash-plugins/plugins/main/index.yml) in Settings → Plugins → Available Plugins → Add Source — same source as Studio Tools, JavStashLinker, Performer Merge and Tag Merge.
Companion plugins
| Plugin | Synergy with Studio Tools Backend |
|---|---|
| Studio Tools | The UI twin for manual search and preview-based merging. |
| Tag Merge Backend | The tag-side automatic cleanup of the same family. |
License: MIT. Feedback and bug reports welcome. Bug reports with the exact studio names, your Stash-box endpoints and your Stash version are gold.
AI Development Statement
From project setup, fault debugging and architecture refactoring to the writing and polishing of all Markdown‑formatted documents, artificial intelligence runs through the entire development workflow of this project, and the whole project is developed with the help of AI.