Watched Together

A Jellyfin plugin that lets several people share one viewing account, while everyone's watched list stays their own.

--- ## The problem You have one television and one Jellyfin login on it. Two, three, four people use it. Whoever's account is signed in on that TV accumulates everything: *Continue Watching* fills with someone else's half-finished documentaries, *Next Up* suggests episode 4 of a series you never started, and the person whose account it is can no longer tell what they have actually seen. The usual workarounds are all bad: - **Everyone shares one account permanently.** Nobody's watched list means anything any more. - **Everyone logs out and back in.** Nobody does this, especially not on a TV remote. - **Everyone gets their own profile on the TV.** Same problem, switching is friction, so people stop. ## What this plugin does It creates a **shared account**, a real Jellyfin user that several people log into together; and gives it three special behaviours: **1. The account creates itself when you log in.** At the login screen, type `alice+bob` as the username and *your own* password. If no such account exists yet, the plugin checks that `alice` and `bob` are both real users and that the password you typed is one of theirs — then creates the shared account and signs you straight into it. No dashboard visit, no admin, no setup step. Next time, it is just there. **2. Any member's own password unlocks it.** Alice types her password, Bob types his, and both get into the same shared account. Nobody has to remember a new credential, and there is no shared password written on a sticky note. **3. Whatever gets watched there is mirrored back to each member's own account.** Finish an episode on the shared account and it is marked watched for Alice *and* Bob, on their individual accounts. Their personal *Continue Watching* and *Next Up* stay correct, and when they watch alone on their phone, the series picks up where the group left off. The sync is **one-way**: shared account → members. What Alice watches privately is her business and never leaks into the shared account or onto Bob. Library access is the **intersection** of the members', never the union: the group sees only what everyone in it could already see. Sharing an account is therefore never a way to reach a library you were not already allowed into. ``` login as "alice+bob+carol" with any one member's password │ ▼ (creates the account if it does not exist yet) ┌──────────────────┐ alice's password │ │ played ──► alice's account bob's password ──►│ shared account │ played ──► bob's account carol's password │ "alice+bob+carol"│ played ──► carol's account └──────────────────┘ any one unlocks it watched state flows outward only ``` ### This is not SyncPlay Jellyfin already has **SyncPlay**, which keeps playback *synchronized in time* across devices so people in different places press play together. Watched Together solves a different problem: people watching *the same screen* who want their *individual watched lists* to stay accurate. The two are complementary and can be used together. --- ## How it works ### Creating a group by logging in When you submit a username Jellyfin does not recognise, it offers the login to every enabled authentication plugin before giving up. That is the hook this plugin uses. On an unrecognised name, it: 1. Splits the name on the separator (`+` by default) — `alice+bob+carol` → three parts. 2. Requires **every part** to be an existing, enabled user that is not itself a shared account. 3. Requires the submitted password to match **one of those members'** stored hashes. Members are checked in the order you typed them and the check stops at the first match, so putting your own name first is marginally quicker. 4. Looks for an existing group with exactly those members. If one exists, you are logged into it. 5. Otherwise creates the shared account, and returns its name so Jellyfin completes the login. Step 3 is what stops this being an open door: knowing two usernames is not enough to bring an account into being. If any check fails, the plugin declines and the login fails exactly as an ordinary typo would. #### Order does not matter `john+jane` and `jane+john` are the same group. Member names are sorted alphabetically to build the account name, and the lookup in step 4 compares members as a set, so both spellings resolve to one account rather than creating a second one for the same two people. The account itself is named with the sorted spelling — `jane+john` — whichever order you happened to type. #### The name collision, and why it is harmless `+` is a legal Jellyfin username character: ``` ^(?!\s)[\w \-'._@+]+(?