Stash and TraDoc
Connect Stash over GraphQL for personal video libraries and HLS playback, and connect TraDoc to translate EPUB, PDF, and DOCX books inside Kavita.
Bunko connects to two specialized companion servers: Stash for personal video collections and TraDoc for automated book and document translation.
Stash (GraphQL & HLS playback)
Configure Stash under Settings › Connections › Stash with your server URL (stashUrl) and API key (stashApiKey, or env seeds STASH_URL / STASH_API_KEY for account 1).
Indexing and linking
- Every 15 minutes (or immediately via
POST /api/stash/sync), Bunko queries Stash's/graphqlendpoint using theApiKeyheader to index scenes (title, code, date, studio, performers, duration, play count, group order) and groups (findGroups, falling back tofindMovieson Stash servers older than0.27). - Unlinked groups and scenes appear in Library › Unlinked. Turn a group into a multi-episode work (
stash:g<id>) or a single scene into a film (stash:s<id>), or link an existing catalog work to Stash viastashLink. - Thumbnails and group covers are served through Bunko's authenticated image proxy (
/api/stash/image?id=) so your Stash API key never reaches the browser.
Direct and HLS streaming
When playing a Stash item (/api/stash/streams), Bunko automatically ranks the best playback mode for your browser:
- Direct stream (
mode=direct) — Served first when the original file is browser-ready MP4/WebM (H.264, VP8/9, or AV1), forwarding HTTPRangerequests. - Stash HLS (
stream.m3u8) — Prioritized automatically when the original codec is not browser-ready; Bunko rewrites HLS playlists to route segments back through Bunko without exposing the Stash API key. - Converted MP4 (
mode=mp4) — Kept as a final fallback.
Played state syncs bidirectionally: Stash play counts advance Bunko's watched progress, and updating watched progress in Bunko triggers sceneAddPlay / sceneIncrementPlayCount or sceneResetPlayCount in Stash.
TraDoc (EPUB, PDF & DOCX book translation)
Configure TraDoc under Settings › Connections › Translation with the TraDoc integration API URL (for example http://tradoc:2507/api/v1) and API key (tdk_…, or env seeds TRADOC_URL / TRADOC_API_KEY). Members need the translate permission (enabled by default).
How book translation works
- Open any followed book, novel, light novel, or web novel that holds files in Kavita (
EPUB,PDF,DOCX,TXT, orMarkdown). - Open the Translate action (
GET /api/translations/filesandGET /api/translations/models), choose the files, target language, provider/model, and output mode, and submit (POST /api/translations). - Bunko validates every file path with
realpathcontainment inside your account's/librarymedia root, uploads the source file to TraDoc with a deterministicexternal_ref(bunko:<account>:<job>so restarts adopt in-flight jobs without re-uploading), and polls status every 30 seconds. - You can
pause,resume,cancel,retry,restore, orremovejobs from the translation panel (POST /api/translations/control). Bunko never deletes your project inside TraDoc.
Output modes: Replace vs. Separate
| Mode | Behavior on completion |
|---|---|
replace | Copies the original file to /data/users/<id>/translation-backups/<job>/ (outside /library so Kavita never indexes duplicates), atomically replaces the file in place, and lets you restore the original at any time. |
separate | Writes the translated book into a sibling series folder named <series> [<LANG>] inside your Kavita library without modifying the original series. |
After installing the translated file, Bunko triggers a Kavita folder scan and index refresh so the translated edition is immediately readable in both Bunko's book reader and Kavita.
Safe recovery on errors
If TraDoc is temporarily unreachable, Bunko preserves job state and retries every two minutes. Deleting a completed replace job with remove cleans up its stored original backup under /data/users/<id>/translation-backups/.
*arr Stack and qBittorrent
Run manual interactive release searches across Sonarr, Radarr, and Prowlarr, grab chosen releases deliberately, and monitor live queues with qBittorrent.
Video Extensions
Configure Stremio-protocol video and subtitle extensions, understand Bunko's sealed relay and SSRF protection, monitor health.json, and opt in self-hosted addons via BUNKO_VIDEO_ALLOWED_HOSTS.