Phase 1b — Jellyfin Connect & Sync #3
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
marvin8/xique#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Xique must learn what each user has watched. Today it has accounts but no media history.
This issue connects a user's Jellyfin server (read-only) and syncs their played items into the local ledger, so recommendations have real data to work from. It covers: the media catalog keyed on provider IDs (never Jellyfin internal item IDs), encrypted per-user Jellyfin credentials obtained via AuthenticateByName, the Jellyfin client, and the delta sync job that appends to the watch ledger and mirrors ratings.
Plan of attack
Full plan:
.superpowers/plans/2026-10-08-xique-02-jellyfin-movie-sync.md(local working artifact; not committed per AGENTS.md).Scope: movies only. TV/episode tracking stays in Phase 3; the
mediaschema carriesmedia_typefor later.Approach. Per-user Jellyfin base URL + Fernet-encrypted access token in
jellyfin_connections; token obtained once viaAuthenticateByName, password discarded. Amediacatalog keyed on provider IDs (never Jellyfin item IDs) plus append-onlywatch_eventsand updatableratings. The web enqueues ajellyfin_syncjob; the worker does all network work.Endpoints (verified against Jellyfin OpenAPI 12.2.0):
GET /System/Info/Public,POST /Users/AuthenticateByName,GET /Items?userId=…&recursive=true&includeItemTypes=Movie&filters=IsPlayed&enableUserData=true&fields=ProviderIds,UserData,Genres,Overview&sortBy=DatePlayed.Key files.
src/xique/services/{crypto,jellyfin,sync}.py,src/xique/db/{connections,media,ledger,jobs}.py,src/xique/db/schema.py(migration 2),src/xique/worker.py,src/xique/web/routes/settings.py+ template, tests alongside.Sequence (7 tasks, each TDD with its own commit):
jellyfin_syncdispatchIssue #7 hardening folded in here: transactional migrations (task 2);
jobs.statusindex, complete/fail status guards, stale-job recovery, poll-interval Setting, bounded worker cycle (task 6). Deferred to a follow-up small PR in this phase: login throttling, session cookieSecure, logout CSRF shape, remaining auth coverage gaps.Branch:
feat/issue-3-phase-1b-jellyfin-movie-syncPR: opened via curl once work is complete, targeting
main, bodyCloses #3.Merged in PR #8 (merge commit
135d3bd). Phase 1b delivered: Jellyfin connect with Fernet-encrypted tokens, migration 2 (media/ledger/connections), movie delta sync, worker hardening (status guards, stale-job recovery, bounded cycle, poll-interval setting), transactional migrations, and the zero-JS settings UI. CI green.