Support Jellyfin 12 alongside 10.11

Jellyfin 12 moved to .NET 10 and changed the IUserManager surface the
plugin relies on: Users/UsersIds became GetUsers()/GetUsersIds(),
ChangePassword takes a user id, HasPassword left the provider contract,
and the user cache is gone, so every lookup is a detached copy.

The plugin now multi-targets net9.0 (against 10.11.5) and net10.0
(against 12.0.0). The differences sit behind a JELLYFIN_12 constant in
Compat/UserManagerCompat.cs, whose ChangePasswordAsync also carries the
stored hash back onto the caller's instance: on 12 the UpdateUserAsync
that claims the account would otherwise write the stale null password
back over the one provisioning just set.

Each release ships one package per generation, with the fourth version
segment naming the target (x.y.z.11 and x.y.z.12) so a 12 server picks
the 12 package over the 10.11 one. scripts/package.sh wraps jprm for a
single generation and the workflows call it twice. The builder image
moves to the .NET 10 SDK, which builds both targets; the net9.0 test run
rolls forward onto the .NET 10 runtime.

CA1873 is a .NET 10 analyzer that flags the same log calls CA1848 does;
it is set to Info, as in the upstream Jellyfin 12 tree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-11 19:25:16 +02:00
co-authored by Claude Opus 5
parent 17bb9a1e8a
commit bd08629fff
18 changed files with 411 additions and 111 deletions
+5 -6
View File
@@ -2,6 +2,8 @@
name: "Watched Together"
guid: "aa3288a0-e8c1-43e2-8045-8c3411142a5b"
version: "0.0.4.0"
# The plugin ships one package per Jellyfin generation. These defaults describe the 10.11 package;
# scripts/package.sh stamps targetAbi/framework for whichever generation it is asked to build.
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"
@@ -26,9 +28,6 @@ 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: >
Fixes creating a group by typing "alice+bob" at the login screen, which failed
with "a Watched Together shared account has no password of its own".
Provisioning set the new account's placeholder password after routing it
through this plugin's authentication provider, which refuses password changes
by design; the password is now set while the account is still on Jellyfin's
default provider.
Adds support for Jellyfin 12 alongside 10.11. Each release now ships two packages:
one built against 10.11 on .NET 9 and one against 12 on .NET 10, and the plugin
repository serves whichever matches your server.