Commit Graph

12 Commits

Author SHA1 Message Date
wmantly fd5ef14999 Harden auth, add AI smart-search and post-download organization
Security & correctness hardening:
- Gate /__api/token/auth behind auth and self-scope every handler to the
  caller (was fully unauthenticated — account-takeover hole).
- Escape LDAP filter values (injection) and reject empty-password binds.
- Enforce per-torrent ownership so private torrents aren't exposed via IDOR.
- Assorted cleanup: fix 'use static' typos, drop dead Torrent.migrate + the
  getTorrentData noUpdate flag, Buffer.alloc, __dirname-relative reads,
  res.statusCode in the error handler, const-scope pubsub.

Login-gated proxy + anti-indexing:
- Block all proxying for logged-out users via an auth-token cookie the front
  end mirrors from its token; serve a local login page instead of hitting TPB.
- robots.txt disallow-all + X-Robots-Tag noindex.

Torrent category:
- Store a normalized category (TV/Movie/Music/Adult/App/Game/Other) mapped
  from the TPB category id; captured at add time (migration).

Smart Search (movies/TV):
- New /__api/search: TMDB title confirm -> scrape piratebay.party HTML ->
  Ollama ranks releases against quality prefs (x265/1080p/~1.5GB/subs,
  prefer uncut) returning a recommended pick, optional warned 4K, and other
  editions. Front-end Smart Search box + dialog feeding the existing add flow.

Post-download organization -> Emby (public Movie/TV only):
- Completion watcher files finished torrents: Ollama parses the release name,
  TMDB canonicalizes title/year, files main video (+subs) into the library
  with edition/quality-aware names (movies + TV SxxExx), stops seeding, and
  triggers an Emby library scan. Low-confidence matches are flagged, not
  mis-filed; correctable via "Fix match". Adds organizedAt/metadata columns.

Shared helpers: controller/tmdb.js, controller/ollama.js. Config blocks for
tmdb/ollama/search/emby/library/organize (secrets stay in gitignored secrets.js).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-01 14:19:13 -04:00
wmantly abc547c642 lots... 2024-01-05 22:06:34 -05:00
wmantly c8f00cdeaf merged 2022-01-01 17:07:30 -05:00
root 2c520e3c3c stuff 2022-01-01 21:53:32 +00:00
root fb08554aa7 ? 2020-05-15 22:42:38 +00:00
wmantly edcc7f6e62 transmission added 2020-03-23 14:07:50 -04:00
wmantly af13200158 mvp1 2020-02-16 13:05:52 -05:00
wmantly 789a51c6e2 mvp 2020-02-16 12:17:20 -05:00
wmantly 249c9cb1f3 basic project 2020-02-16 03:01:30 -05:00
wmantly a5165478b9 test1 2020-02-15 15:15:51 -05:00
wmantly 6e42c2a819 test1 2020-02-15 15:06:38 -05:00
wmantly e7a8c9a11d started 2020-02-15 14:58:52 -05:00