unit3dprep¶
Web UI + CLI pre-flight uploader for Unit3D trackers — direct pairing with unit3dup.
Checks for Italian audio tracks, renames files according to the ItaTorrents naming convention (and other Unit3D trackers), hardlinks them into ~/seedings/, and launches unit3dup to perform the upload. Works from a terminal or from a browser.

Two usage modes
- CLI — interactive flow for a single file or an entire season. Ideal over SSH.
- Web UI — React SPA served by FastAPI. Guided wizard, upload queue, history, settings, real-time logs.
What it does¶
- Scans your library (
~/media/{movies,series,anime}or custom folders). - Checks for Italian audio tracks via
pymediainfo. - Fetches official metadata from TMDB (by manual ID or via search).
- Builds the final filename per the ItaTorrents naming convention.
- Hardlinks the renamed file into
~/seedings/(same filesystem required). - Launches
unit3dup -b -uorunit3dup -b -fto upload it. - Records the exit code into the history (JSON) and exposes it in the Web UI.
Quick start¶
# 1. Install the package
pip install -e .
# 2. Generate password hash + session secret
python generate_hash.py
# 3. Export the variables (or put them into ~/.bashrc)
export U3DP_PASSWORD_HASH="..."
export U3DP_SECRET="..."
export TMDB_API_KEY="..."
export U3DP_PORT="8765"
# 4. Start the Web UI
unit3dprep-web
Open http://127.0.0.1:8765 and enter the password.
For full details see Installation and Configuration.
Deployment guides¶
- VPS with sudo / Docker — generic Linux server using systemd, nginx + Let's Encrypt.
- Ultra.cc — Ultra.cc seedbox with reserved port, user-level systemd unit, and nginx user-proxy.
Tech stack¶
| Component | Technology |
|---|---|
| Backend | FastAPI + uvicorn + Starlette |
| SSE | sse-starlette |
| Auth | bcrypt + itsdangerous (session cookies) |
| Frontend | React 18 + Vite + TypeScript + lucide-react |
| Filename parsing | guessit |
| MediaInfo | pymediainfo (requires libmediainfo) |
| Metadata | TMDB API v3 |
| Upload | unit3dup (external CLI) |
| Persistence | JSON files (no SQLite — _sqlite3 broken on pyenv Python 3.13) |
Useful links¶
- Repo: https://github.com/davidesidoti/unit3dprep
- ItaTorrents: https://itatorrents.xyz
- TMDB API: https://www.themoviedb.org/settings/api
unit3dup: https://pypi.org/project/unit3dup/