Implement Watched Together shared viewing accounts
🏗️ Build Plugin / build (push) Has been cancelled
🧪 Test Plugin / test (push) Has been cancelled

Replaces the plugin template with a working plugin that lets several
users share one viewing account while keeping their individual watched
lists accurate.

Three pieces:

- Auto-creating groups. Logging in as "alice+bob" with any named
  member's own password provisions the shared account and signs you in.
  Verified against 10.11.5: AuthenticateUser offers unmatched usernames
  to every enabled provider and re-queries afterwards, which is the hook
  this relies on. Gated on a real member password so knowing two
  usernames is not enough to create an account.

- Multi-password authentication. IRequiresResolvedUser hands us the
  resolved shared account; each member's live stored hash is checked via
  ICryptoProvider.Verify. Deliberately avoids re-entering
  UserManager.AuthenticateUser, which would trip every member's
  failed-attempt counter whenever a different member's password matched.

- One-way played-state sync. Shared account to members only, filtered to
  PlaybackFinished/TogglePlayed/Import so playback progress ticks are
  ignored. No loop guard needed: member writes carry a non-shared id.

Membership is stored as user IDs rather than re-parsed from the username,
so shared accounts can be renamed freely. The +/name collision resolves
itself because Jellyfin only consults the plugin when no local user
matches the typed name.

Targets Jellyfin 10.11.x / net9.0. Adds Gitea CI (test, build, release),
a builder image, and 34 tests covering the auth and sync rules.
This commit is contained in:
2026-07-29 00:00:13 +02:00
parent 7a9dbdafcc
commit 7be07d16a2
46 changed files with 3319 additions and 690 deletions
+21 -10
View File
@@ -1,16 +1,27 @@
---
name: "Template"
guid: "eb5d7894-8eef-4b36-aa6f-5d124e828ce1"
name: "Watched Together"
guid: "aa3288a0-e8c1-43e2-8045-8c3411142a5b"
version: "1.0.0.0"
targetAbi: "10.9.0.0"
framework: "net8.0"
overview: "Short description about your plugin"
targetAbi: "10.11.0.0"
framework: "net9.0"
overview: "One shared login for several people; watched state flows back to each member's own account"
description: >
This is a longer description that can span more than one
line and include details about your plugin.
Watched Together lets several users share a single viewing account. Any member's
password unlocks the shared account, and anything marked watched or unwatched there
propagates one-way to each member's individual account.
This is not synchronized playback - for watching in lockstep across devices, use
Jellyfin's built-in SyncPlay. Watched Together solves the "one TV, one login, but
everyone's Continue Watching should stay correct" problem instead.
category: "General"
owner: "jellyfin"
owner: "dtourolle"
artifacts:
- "Jellyfin.Plugin.Template.dll"
- "Jellyfin.Plugin.WatchedTogether.dll"
build_type: "dotnet"
dotnet_configuration: "Release"
dotnet_framework: "net9.0"
# Point at the plugin project rather than the solution so the test project is not packaged.
project: "Jellyfin.Plugin.WatchedTogether/Jellyfin.Plugin.WatchedTogether.csproj"
changelog: >
changelog
Initial release: provisioned shared accounts, multi-password authentication,
and one-way played-state sync to members.