feat(emby): import Emby watch history into recommendations #10

Open
techfather wants to merge 1 commit from feat/emby-history into main
Owner

Emby becomes a first-class history source alongside Plex, configured
server-wide by an admin rather than per user.

  • Add an Emby client (token-header auth, timeouts, no redirects, bounded
    history fetch) with distinct rejected/unavailable errors.
  • Resolve Emby history to titles via TMDB/IMDb ids, falling back to
    title and year.
  • Persist per-user import bookkeeping (attempted/synced/last error/server
    name) and add migration 0008; the migration alters columns directly
    because batch table recreation cascaded into signal rows.
  • Record watched_emby signals through validation, storage, scoring
    weights and profile invalidation.
  • Keep the connection env-only (EMBY_URL, EMBY_API_KEY, optional
    EMBY_USERNAME) per SPEC 9; no API response returns the URL or key.
  • Expose admin status and manual sync endpoints with same-origin and
    admin rate-limit guards registered in the mutation inventory.
  • Settings page gets a status-only Emby card: configuration state, server
    name, history count, last sync, last error, and Sync now.
  • Add a contract test cross-checking every frontend API URL against the
    real FastAPI route table.

What / why

Spec

  • OpenSpec change: <change-id>
  • Change archived on this branch (if applicable)

Checklist

  • just check passes locally
  • Title is the Conventional Commit subject for the squash
Emby becomes a first-class history source alongside Plex, configured server-wide by an admin rather than per user. - Add an Emby client (token-header auth, timeouts, no redirects, bounded history fetch) with distinct rejected/unavailable errors. - Resolve Emby history to titles via TMDB/IMDb ids, falling back to title and year. - Persist per-user import bookkeeping (attempted/synced/last error/server name) and add migration 0008; the migration alters columns directly because batch table recreation cascaded into signal rows. - Record watched_emby signals through validation, storage, scoring weights and profile invalidation. - Keep the connection env-only (EMBY_URL, EMBY_API_KEY, optional EMBY_USERNAME) per SPEC 9; no API response returns the URL or key. - Expose admin status and manual sync endpoints with same-origin and admin rate-limit guards registered in the mutation inventory. - Settings page gets a status-only Emby card: configuration state, server name, history count, last sync, last error, and Sync now. - Add a contract test cross-checking every frontend API URL against the real FastAPI route table. ## What / why <!-- 2-4 sentences: what changes and why it's needed. --> ## Spec - OpenSpec change: `<change-id>` <!-- or "n/a: fix/chore" --> - [x] Change archived on this branch (if applicable) ## Checklist - [x] `just check` passes locally - [x] Title is the Conventional Commit subject for the squash
feat(emby): import Emby watch history into recommendations
Some checks failed
gate / e2e (pull_request) Successful in 1m38s
gate / container-smoke (pull_request) Successful in 2m0s
security / advisories (pull_request) Successful in 22s
gate / check (pull_request) Failing after 2m35s
c03bf06fea
Emby becomes a first-class history source alongside Plex, configured
server-wide by an admin rather than per user.

- Add an Emby client (token-header auth, timeouts, no redirects, bounded
  history fetch) with distinct rejected/unavailable errors.
- Resolve Emby history to titles via TMDB/IMDb ids, falling back to
  title and year.
- Persist per-user import bookkeeping (attempted/synced/last error/server
  name) and add migration 0008; the migration alters columns directly
  because batch table recreation cascaded into signal rows.
- Record watched_emby signals through validation, storage, scoring
  weights and profile invalidation.
- Keep the connection env-only (EMBY_URL, EMBY_API_KEY, optional
  EMBY_USERNAME) per SPEC 9; no API response returns the URL or key.
- Expose admin status and manual sync endpoints with same-origin and
  admin rate-limit guards registered in the mutation inventory.
- Settings page gets a status-only Emby card: configuration state, server
  name, history count, last sync, last error, and Sync now.
- Add a contract test cross-checking every frontend API URL against the
  real FastAPI route table.
techfather scheduled this pull request to auto merge when all checks succeed 2026-10-18 15:18:16 -07:00
techfather scheduled this pull request to auto merge when all checks succeed 2026-10-18 15:18:53 -07:00
Some checks failed
gate / e2e (pull_request) Successful in 1m38s
Required
Details
gate / container-smoke (pull_request) Successful in 2m0s
Required
Details
security / advisories (pull_request) Successful in 22s
gate / check (pull_request) Failing after 2m35s
Required
Details
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'feat/emby-history:feat/emby-history'
git switch 'feat/emby-history'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
techfather/tasterr!10
No description provided.