Missing Scenes

:placard: Summary Discover scenes from StashDB that you don’t have locally. View missing scenes for performers and studios, with optional Whisparr integration for automated downloading and cleanup.
:link: Repository https://github.com/carrotwaxr/stash-plugins/tree/main/plugins/missingScenes
:information_source: Source URL https://carrotwaxr.github.io/stash-plugins/stable/index.yml
:open_book: Install How to install a plugin?

Missing Scenes

Discover scenes from StashDB that you don’t have in your local library. Browse missing scenes for performers and studios, with optional Whisparr integration for automated downloading and cleanup.

:link: Links

:package: Installation

  1. Go to Settings → Plugins → Available Plugins
  2. Add source: https://carrotwaxr.github.io/stash-plugins/stable/index.yml
  3. Find “Missing Scenes” under “Carrot Waxxer” and click Install
  4. Reload plugins

:sparkles: Features

Core

  • Find missing scenes for any performer or studio linked to StashDB
  • Visual grid with thumbnails, titles, release dates, and performer info
  • Click any scene to view it on StashDB
  • Works with StashDB, FansDB, or any configured stash-box endpoint

Whisparr Integration (Optional)

  • Add missing scenes directly to Whisparr with one click
  • Bulk “Add All to Whisparr” button
  • Live status tracking: Downloading (with %), Queued, Stalled, Waiting, Downloaded
  • Auto-cleanup: Automatically removes scenes from Whisparr when tagged in Stash

Automation

  • “Scan for New Scenes” task uses your Stash scan defaults
  • “Cleanup Whisparr” bulk task for maintenance
  • Scene.Update.Post hook for automatic Whisparr cleanup

:gear: Configuration

Configure in Settings → Plugins → Missing Scenes:

Setting Description
Stash-Box Endpoint Which stash-box to query (defaults to first configured)
Whisparr URL Your Whisparr instance (e.g., http://localhost:6969)
Whisparr API Key From Whisparr Settings → General → Security
Quality Profile ID Whisparr quality profile (default: 1)
Root Folder Where Whisparr downloads scenes
Search on Add Auto-search when adding to Whisparr
Auto-cleanup Whisparr Remove from Whisparr when scene gets tagged
Unmonitor Instead of Delete Keep in Whisparr but prevent re-download
Scan Path Path for “Scan for New Scenes” task (e.g., /data/unsorted)

:arrows_counterclockwise: Recommended Workflow

  1. Browse missing scenes for a performer or studio
  2. Add scenes to Whisparr (individually or bulk)
  3. Whisparr downloads the scenes to your scan path
  4. Run “Scan for New Scenes” task (or schedule it via cron/User Scripts)
  5. Tag imported scenes using Stash’s Tagger
  6. Hook automatically removes tagged scenes from Whisparr

:warning: Requirements

  • Stash v0.25.0 or later
  • At least one stash-box endpoint configured (Settings → Metadata Providers)
  • Performers/Studios must be linked to stash-box (use the Tagger)
  • Whisparr v3 for Whisparr integration

:beetle: Troubleshooting

“Performer/Studio is not linked to StashDB”
Use the Tagger to match and link the performer/studio to StashDB first.

“No stash-box endpoints configured”
Add an endpoint at Settings → Metadata Providers → Stash-box Endpoints.

Whisparr status not showing
Verify your Whisparr URL and API key in plugin settings. Check Stash logs for errors.

Issues? Report them at GitHub · Where software is built

:clipboard: Changelog

v1.2.0

  • Added Whisparr status tracking (Downloading %, Queued, Stalled, Waiting)
  • Added Auto-cleanup hook (removes from Whisparr when tagged in Stash)
  • Added “Scan for New Scenes” task with user’s default scan settings
  • Added “Cleanup Whisparr” bulk task

v1.1.0

  • Added Whisparr integration
  • Added bulk “Add All to Whisparr” button

v1.0.0

  • Initial release with performer and studio support
5 Likes

Loving the plugin, but sometimes it seems to return inaccurate numbers. For example, visiting the Exploited College Girls studio on StashDB shows 1,173 scenes, but clicking the “Missing Scenes” button in Stash only shows 394 scenes. Am I missing something?

I’ll take a look at it tomorrow while I wait for all the content I added using it to download :joy:

1 Like

I just checked with excogi as well, shows the same for me.

1 Like

Thanks for reporting this @slinky and @Cadey! I was able to reproduce and fix the issue.

Root cause: The plugin was using StashDB’s TRENDING sort when querying studio scenes. It turns out TRENDING only returns scenes that have trending data (fingerprints, recent activity), which excludes older scenes. For Exploited College Girls, TRENDING returned ~396 scenes while the actual count is 1,173.

Fix: Changed the studio query to use DATE sort instead, which returns all scenes. Also increased the pagination limit from 1,000 to 5,000 scenes to support larger studios/performers.The fix is now live.

2 Likes

Is it possible to use theporndb as an endpoint with this?

Not yet but I can look into it

1 Like

Thank you for the fix, it’s working great now!

On a slightly different note, I’m getting date results that are one day offset from StashDB.

For example, running “Missing Scenes” on Tushy will show the latest scene called “Naughty Redhead Gapes Her Round Ass Wide Open.”

In the “Missing Scenes” panel it shows “Dec 6, 2025” but on StashDB it shows “2025-12-07.”

It seems to be a consistent one-day offset across various scenes.

Good catch thank you! I bet there’s a minor bug in the date formatting

1 Like

I think the version I pushed today fixed this

1 Like

Missing Scenes now supports Tags in Stash 0.30+! The Missing Scenes button will appear on Tag detail pages if that Tag has Stash IDs

Pushed an update today because I kept getting 504 errors, and I believe that was due to it trying to fetch everything for the entity from StashDB. I made some changes that should make it much snappier and avoid those errors. Please let me know if this introduces other problems!

Issue Description (for Plugin Developers)

Title

runPluginOperation throws “Invalid JSON input: Invalid \escape” error when running missingScenes plugin on latest Stash version

Body

Environment

  • Stash Version: latest (≥ v0.25.0, confirmed with v0.30+ for tag support)

  • Plugin Version: missingScenes (latest available version)

  • OS: [Please fill in your OS, e.g., Windows 11 / Ubuntu 22.04 / macOS Ventura]

Problem Summary

When attempting to run the plugin via the GraphQL mutation on the latest Stash release, the operation fails immediately with a JSON parsing error. The error specifically flags an invalid escape sequence at a precise position in the JSON input, which prevents the plugin from executing its core functionality (querying StashDB for missing scenes, integrating with Whisparr, etc.).missingScenesrunPluginOperation

Detailed Error Message

plaintext

Error
runPluginOperation: Input: runPluginOperation Invalid JSON input: Invalid \escape: Line 1, Column 705 (char 704)

Reproduction Steps

  1. Fully configure Stash with a valid Stash-box endpoint (StashDB) and linked performers/studios/tags.

  2. Install the missingScenes plugin and configure optional settings (Whisparr URL, API key, scan path) as per the plugin’s README.

  3. Navigate to a linked performer/studio/tag detail page in Stash.

  4. Click the “Missing Scenes” button to trigger the for the plugin.runPluginOperation

  5. Observe the error popup with the invalid JSON / invalid \escape message.

Root Cause Analysis (Observed)

  1. Strict JSON Parsing in Latest Stash: The latest Stash version enforces strict compliance with RFC 8259 JSON specification, with zero tolerance for invalid escape sequences. Older Stash versions had more lenient JSON parsing and did not throw this error for the same plugin configuration.

  2. Invalid Escape Sequences in Plugin’s JSON Output: The missingScenes plugin generates or loads JSON data that contains illegal escape characters (primarily where the sequence is not a valid JSON escape) and unescaped backslashes (e.g., Windows file paths like where / are misinterpreted as invalid escapes).\escape\eC:\data\unsorted\d\u

  3. Manual JSON String Concatenation: The plugin appears to manually construct JSON strings in its source code (instead of using native JSON serialization utilities) , leading to unescaped special characters and invalid escape sequences that fail strict parsing.

Expected Behavior

  1. The runPluginOperation应该能成功解析插件的 JSON 输入而不触发 escape seq

  2. missingScenes 插件应该会按预期加载并显示 StashDB 中缺失场景列表。

  3. 可选的 Whisparr 集成功能(添加到 Whisparr,自动清理)应该

附加N

  • 即使清除了Stash的CAC账户,这个错误依然存在cache/, folders) and the plugin’s tmp/__pycache__ directory.

  • 验证插件生成的 JSON 输入(从 Stash 调试日志中提取)在 JSONLint confi 中\e报告位置的转义序列(第1行,C)

  • 该插件在旧版 Stash(≤ v0.24.x)上运行正常,且配置相同,确认问题与最新 St 的兼容性有关

Request

能否请您更新一下

  1. 移除所有无效的JSON逃逸\escapeescape).

  2. 正确地避免文件路径中的反斜杠和\\ for literal \ or for cross-platform path separators)./

  3. 用nat替换手动JSON字符串串接JSON.stringify() in JS, json.dumps()在 Python 中)以确保合规

  4. Add compatibility checks for the latest Stash’s strict JSON parsing requirements.

Thank you for your work on this useful plugin!

Thanks for the great report! I’ll look into this. I don’t think I’ve been experiencing this issue myself, but will all of these details, I bet I can figure it out!

Hi!

Thanks for your plugin, just started to use it and it seems really useful.
Small request, do you think on the grid list, when selecting “favorite tags” the tag(s) that made the scene match could be displayed ?
Would be really nice QoL to assess them at a glance.

Whenever i use this and press “Missing Scenes” i dialog come up saying “Searching StashDB for missing scenes…” But nothing happens..

I have not filled out Whisparr, only updated the end-point with https://stashdb.org/graphql

Log says “[Plugin / Missing Scenes] Building local stash_id cache for StashDB

Hey tarzan, thanks for the report!

The “Building local stash_id cache” message means the plugin is scanning your local library to figure out which StashDB scenes you already have. This step can take a while depending on your library size — it
pages through all scenes linked to StashDB at 100 per page.

A few questions to help narrow it down:

  1. How many scenes are in your library? (Check the Scenes page — the count in the top right)
  2. Which page did you click Missing Scenes from — a performer, studio, or tag page?
  3. Is there anything after that log line? If you wait a minute or two, does another log message appear (like “Cache built: X scenes…”)?
  4. What Stash version are you running?

For the stash-box config — the plugin reads your endpoints directly from Stash’s settings (Settings > Metadata Providers), so as long as you have StashDB configured there with an API key, you’re good. No need
to configure anything in the plugin settings for that.

If it is just taking a long time, that’s something I want to improve — the plugin should give better progress feedback during that cache step instead of going silent

while finding missing scenes, the code correctly identifies that i have 66 scenes missing however it loads, more than 66 in multiples of 50, in this case 100.

also, it would be helpful if the number of missing scenes to be loaded can be a user set variable. as for my case, for loading the next 50 scenes it again starts building local stash_id cache, which take time to build.