catacomb/src
Luna 375a24262c Upload date in UI; extract HTML_UI; Twitch clips mode; DB connection pool
Four nice-to-have items, plus surfacing the upload date in both UIs
since the user explicitly asked.

Upload date display
- Desktop: card meta row now includes a `YYYY-MM-DD` cell between the
  ID and the duration; detail panel header shows it as `📅 YYYY-MM-DD`.
- Web: video player modal title gains a date+duration subline so the
  viewer has context without opening the metadata pane (card meta
  already shows the date).
- New `format_upload_date()` helper on the desktop side; the web side
  reuses the existing `fmtDate()` JS.

Extract HTML_UI to include_str!
- `LOGIN_HTML` and `HTML_UI` moved out of `src/web.rs` into
  `src/web_ui/login.html` and `src/web_ui/index.html`. The Rust file
  drops from 2915 lines to 1806; editors now syntax-highlight the
  HTML/CSS/JS, and UI diffs no longer overwhelm the Rust diff view.
- `include_str!` bakes them into the binary at compile time, so there
  is no runtime fs lookup and no extra deploy artifacts.

Twitch clips-only mode
- `classify_twitch` now recognises `twitch.tv/<user>/clips` as a
  Channel URL (was Unknown), so yt-dlp's TwitchClips extractor is
  reachable from our normal download pipeline.
- Both UIs gain a "Clips only" toggle visible only when the URL is
  a Twitch channel (not a specific VOD/clip). On submit, the URL is
  rewritten to `twitch.tv/<user>/clips` before dispatch.
- 1 new platform test covers the clips-listing classification.

DB connection pool (r2d2_sqlite)
- `Database` now wraps an `r2d2`-managed SQLite pool. File-backed
  databases get up to 4 connections; the in-memory fallback is capped
  at 1 (since each in-memory connection is a fresh empty DB by default
  in SQLite).
- `WebState.db` drops its outer `Mutex` — concurrent handlers each
  check out their own connection from the pool. Static-file fetches
  through `/files/` no longer serialize on the watched/positions/
  password lookups that the auth middleware performs.
- Pool init failures are converted to `rusqlite::Error` so the
  existing `Result<T>` return types still work.

47 unit tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 01:17:08 -07:00
..
web_ui Upload date in UI; extract HTML_UI; Twitch clips mode; DB connection pool 2026-05-25 01:17:08 -07:00
app.rs Upload date in UI; extract HTML_UI; Twitch clips mode; DB connection pool 2026-05-25 01:17:08 -07:00
config.rs Add bundled yt-dlp, music library, Plex metadata, sort by date; security + perf hardening 2026-05-23 04:54:26 -07:00
database.rs Upload date in UI; extract HTML_UI; Twitch clips mode; DB connection pool 2026-05-25 01:17:08 -07:00
downloader.rs Tackle remaining unscoped items: cookies chmod, log redact, Bandcamp, ETag+gzip 2026-05-25 00:26:47 -07:00
library.rs Live-stream recording, recent-additions feed, per-platform impersonate profiles 2026-05-25 00:17:59 -07:00
main.rs Add multi-platform support: TikTok, Twitch, Vimeo, Bandcamp, SoundCloud, Odysee 2026-05-24 22:16:40 -07:00
maintenance.rs Add bundled yt-dlp, music library, Plex metadata, sort by date; security + perf hardening 2026-05-23 04:54:26 -07:00
platform.rs Upload date in UI; extract HTML_UI; Twitch clips mode; DB connection pool 2026-05-25 01:17:08 -07:00
plex.rs Add multi-platform support: TikTok, Twitch, Vimeo, Bandcamp, SoundCloud, Odysee 2026-05-24 22:16:40 -07:00
stats.rs Add statistics view, editable source_url, rewrite security audit 2026-05-23 05:34:29 -07:00
theme.rs Add web UI, AGPL3, notifications, continue watching, bulk watched, storage stats, scheduler 2026-05-11 04:27:04 -07:00
web.rs Upload date in UI; extract HTML_UI; Twitch clips mode; DB connection pool 2026-05-25 01:17:08 -07:00
ytdlp_bin.rs Switch bundled yt-dlp to a Python venv with curl_cffi for impersonation 2026-05-24 23:17:27 -07:00