- Python 37.9%
- JavaScript 33.7%
- CSS 20%
- HTML 7.9%
- Shell 0.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| static | ||
| templates | ||
| .gitignore | ||
| agent_mcp.py | ||
| AGENTS.md | ||
| app.py | ||
| backup.sh | ||
| CLAUDE.md | ||
| README.md | ||
| ROADMAP.md | ||
| run.sh | ||
🌙 MediaVault
A self-hosted media database that links your Plex library, watched history (Plex + Letterboxd + MyAnimeList), and a curated watchlist into one place — with TMDB-powered discovery, an acquisition helper wired to qBittorrent, and director/cast browsing.
Features
- Library — browse your full Plex library with rich filters (genre, decade, runtime, rating) and sorting; posters proxied straight from Plex.
- Tonight — "what should I watch?" picker with mood presets (quick watch, long evening, horror, hidden gem, retro) over your unwatched films, plus advanced filters (genre, decade, runtime, rating, title, include-watched).
- Discover — curated watchlist + TMDB recommendations seeded from your 5★ Letterboxd films, "deep cuts" mode, and hidden gems. Find Similar takes any movie/show title and returns similar titles ranked by a content-match score (genre overlap, rating, vote confidence, year proximity), cross-referenced against your library.
- Acquire — watchlist items not yet in Plex, priority-scored, with in-app qBittorrent search and one-click "Send to qBit".
- Insights — genre/decade breakdowns, watch-time totals, Letterboxd rating distribution, hidden gems and recently-added rails.
- ✦ Ask — chat assistant with tool access to your library, watchlist, and
TMDB similar-title search ("what should I watch tonight?", "find films like
X", "add Y to my watchlist"). Providers (Settings → Assistant):
Claude via your Pro/Max subscription (default — runs your own logged-in
claudeCLI, no metered tokens; Haiku by default), Claude via API key, or Kimi. - Person pages — click any director/writer/actor to see their full filmography cross-referenced against your library, watchlist, and watched history.
- Trailers & More like this in every item modal.
- External links — IMDb, TMDB, Letterboxd (films), MyAnimeList (anime).
Setup
pip install flask requests
python3 app.py
Then open http://127.0.0.1:7331 and configure under Settings:
- Plex token — required to sync your library. Sync → Libraries to sync picks which Plex movie/TV libraries are pulled in (default: all of them).
- TMDB API key — free at themoviedb.org; enables posters, recommendations, trailers, credits.
- qBittorrent — Web UI URL / username / password for the Acquire tab.
Watched-history imports (optional)
Drop export files in ~/.local/share/plex-watched/:
movies.txt,tv_shows.txt—Title (Year)per lineletterboxd.txt—★★★★ | Title (Year)per linemal.txt—8/10 | Title [...]per linecurated_watchlist.md—## Categoryheaders,**Title (Year)** — reason
Then hit Sync Now in Settings. Working Plex access is required; a failed Plex refresh preserves the cache and aborts imports.
Sync and matching
- Plex refreshes are transactional and paginate even when an individual metadata record is skipped. Completed TV series use Plex's aggregate episode counts.
- Watchlist/library matching respects movie/TV namespaces, known IDs, and remake years. Valid Plex associations are preserved instead of reassigned by title.
- Curated imports enrich an existing matching entry without duplicating it or resetting its status, rating, notes, or original source.
- A successful sync refreshes cached views on the active/next tab visit while retaining search, sort, and filter preferences. Person-view Back restores working title actions, trailers, and episode controls.
- qBittorrent search failures are reported rather than presented as no matches; temporary search jobs are stopped and deleted.
Remote access (Tailscale / LAN)
By default the app binds to loopback only. To reach it remotely:
- Settings → Network → set bind host to
0.0.0.0 - Add your hostname/IP to allowed Host headers (e.g. your tailnet name)
- Set an auth token (required for any non-loopback request)
- Restart, then visit
http://your-host:7331/?auth=<token>
Loopback requests always skip auth. Non-loopback requests must send the token
via X-Auth-Token header or ?auth= query param. A browser that opens the
?auth= link gets an HttpOnly cookie and is redirected to the same page
without the token, so later visits need no token in the URL.
Security notes
media.dbholds all secrets (Plex/TMDB/qBit/auth) and is gitignored.- Host-header validation blocks DNS-rebinding attacks.
- Non-GET requests from another origin (a hostile web page POSTing to 127.0.0.1) are rejected.
rating_keyinputs are validated to digits to prevent SSRF via the thumb proxy.
Stack
Flask + SQLite backend, vanilla-JS SPA frontend. No build step. Five themes (witchy default, trans pride, dracula, solarized dark/light), each a pure CSS-variable palette swap.
The ✦ button in the header toggles atmospheric effects (film grain, glows, backdrop blurs, entrance animations). Turn it off on low-power or compositing-sensitive displays — the palette and layout stay intact, only the continuous-repaint effects drop. The choice is remembered, and reduced effects are the default for anyone whose OS requests reduced motion.