Allow download.failed plugins to mark a recovered queue item as completed
Summary
Please expose an official SDK/API path for a download.failed plugin to mark the original queue item as recovered/completed when the plugin successfully produces a replacement file.
Current behavior
A plugin can return ctx.ok(...) with mutations.activeFilepath, and the post-processing workflow is logged as completed. However, the original download queue item remains in the UI as Failed because the original yt-dlp command failed before the plugin fallback recovered it.
Example from a local plugin test:
- Original URL:
https://m.facebook.com/reel/1976285736162997/ - Original Youwee download failed with
[facebook] Cannot parse data download.failedplugin retried without browser cookies and wrote a recovered MP4 to Downloads- Plugin workflow log:
Status: Completed - Queue UI still shows the item as
Failed
Why this matters
Fallback plugins can recover public videos when the default command fails, but users still see a failed queue item even though the recovered file exists. This is confusing and makes fallback plugins look unsuccessful.
Requested API
One of these would work:
- Allow
download.failedhook result mutations to mark the original queue item as recovered/completed whenactiveFilepathpoints to an approved output file. - Add an explicit SDK mutation such as
queueStatus: "completed"/recovered: trueplusfilepath,filesize, and optional title/thumbnail metadata. - Add an app-owned helper, e.g.
ctx.youwee.download.markRecovered(...), that validates the file path and updates queue/history safely.
Constraint
Please prefer an official SDK/app-mediated API. Plugins should not patch Youwee's SQLite queue state directly because that is outside the plugin contract and risks corrupting app state.
Released in v0.18.0 and SDK v2.3.0