Commit Graph
41 Commits
Author SHA1 Message Date
dtourolle 5c8430f207 Treat member order as insignificant when resolving a group
🏗️ Build Plugin / build (push) Successful in 38s
🧪 Test Plugin / test (push) Successful in 34s
"jane+john" and "john+jane" name the same group, but they did not behave
that way. Jellyfin only routes a login here when no account matches the
typed name, so logging in with the reversed spelling of an existing group
found nothing and quietly created a second shared account for the same
two people - each with its own watched state.

Group identity is now order-independent:

- Member names are sorted alphabetically when building an account name,
  so a given set of members always produces the same name.
- Before creating anything, the login path looks for an existing group
  whose members are exactly the named set, compared as a set rather than
  a sequence, and logs into that account if it finds one.
- Stored member lists are kept in the same canonical order on create and
  update, so a group's stored order does not depend on the order an
  admin happened to select members in.

Passing no name through to provisioning lets it generate the canonical
name, rather than preserving whatever order was typed.

Members are also now checked in the order they were typed, stopping at
the first match, so whoever puts their own name first is verified first.
Verification is a deliberately slow hash comparison, so the ordering is
worth having; it is only a preference, and any member's password still
unlocks the group.
2026-07-31 09:35:14 +02:00
dtourolle b4134dd744 Grant shared accounts the intersection of member library access
Previously the shared account's libraries were chosen independently of
its members, so a group could see a library that one of its members was
blocked from - joining a group became a way to gain access. That was
especially sharp with auto-created groups, where no admin is in the loop.

A shared account is now granted exactly the libraries every member can
already reach. If one member is blocked from a library, no group
containing them can see it. The account is therefore always a subset of
what each member could reach alone, which is what makes creating groups
at the login screen safe to leave on by default.

Details:

- "Enable all folders" is expanded to concrete library ids before
  intersecting, since it cannot otherwise be compared with an explicit
  list. Shared accounts are always given an explicit list, never the
  all-folders permission, so newly added libraries do not silently widen
  an existing group.
- Explicitly blocked folders are subtracted even for members who
  otherwise have access to everything.
- Fails closed: an unresolvable member contributes no access rather than
  being treated as unrestricted.
- Recomputed when membership changes, and re-applied to every group at
  startup so narrowing a member's own access narrows their groups.

Drops the now-meaningless EnableAllFolders/EnabledFolders provisioning
inputs and the DynamicGroupsEnableAllFolders setting. Adds 8 tests
covering the intersection rules.
2026-07-29 00:15:32 +02:00
dtourolle 7be07d16a2 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.
2026-07-29 00:00:13 +02:00
T-GanderandGitHub 7a9dbdafcc Update README for .NET SDK version and setup instructions (#85) 2025-11-23 11:26:03 -07:00
Shadowghost 3afa1fc407 Upgrade template to 10.9.x and .NET 8 2024-10-05 17:06:23 +02:00
Anthony LavadoandGitHub 2c1143b49f Merge pull request #65 from mrnoname1000/master 2024-10-05 11:01:52 -04:00
ErikandGitHub 2ddd08221d Updated to specify that you need to place the plugin DLL into a subfolder (#71) 2024-05-19 08:08:00 -06:00
mrnoname1000andGitHub 7fe332f29c README.md: Fix sh UUID generator
And make call to head POSIX-compliant
2023-10-19 23:35:44 +00:00
Johannes KauffmannandGitHub 0cb471baa2 Fix typo in interface name (#61) 2023-06-30 18:23:54 -06:00
Tuur VanhoutteandGitHub 6495c17c7f (chore: README.md) change codeblock language to jsonc
The markdown codeblocks in the README were using `json`, which has no support for comments, making them highlighted in red. `jsonc` does have support, correctly rendering the codeblocks.
2023-04-30 23:47:45 +02:00
Matthew Strasiotto 5e63c884e8 Update README to reflect new .vscode structure 2022-04-23 20:19:25 +10:00
Patrick Farwick 28a25a426c Add an example tasks.json file 2022-01-23 11:51:22 +01:00
Patrick Farwick d943670461 Automate the setup on visual studio code
This commit describes how to setup an automation for Visual Studio Code.
The automation aims to build the plugin and then start the server and
optionally the web-client. This way, only one IDE project has to be
opened which starts all necessary dependencies.
2022-01-22 23:00:50 +01:00
ldellisola f7a179e9eb Added information about debugging plugins using Visual Studio 2022-01-22 14:12:32 +01:00
Konrad RejandGitHub 503f7e4696 Update dotnet version
Change references to dotnet 5.0 to dotnet 6.0 as the plugin template has been updated to dotnet 6.0.
2022-01-12 00:04:39 +01:00
Cody RobiberoandGitHub c6e0e3414a Merge pull request #34 from jellyfin/BaronGreenback-patch-1 2021-11-17 17:46:46 -07:00
Patrick Farwick aec58cd20d Clarify the directory to copy the plugin to 2021-10-06 23:32:06 +02:00
Patrick Farwick 7c634d9ccc Describe how to debug the plugin
Close #15
2021-10-06 23:24:58 +02:00
BaronGreenbackandGitHub b44c58f11b Update README.md
Add caveat on IServerEntryPoint
2021-05-29 11:55:59 +01:00
David e65a260699 Remove more outdated interfaces 2021-01-24 17:35:49 +01:00
David f21f3f16f8 Remove no longer available interfaces from README 2021-01-24 17:21:24 +01:00
dkanadaandGitHub cc20076fbd fix trailing space 2021-01-10 20:30:04 +09:00
dkanadaandGitHub ee82d22666 readme changes 2021-01-10 20:23:01 +09:00
crobibero a2444f776c Update README.md 2020-12-09 16:29:14 -07:00
crobibero 50468fd108 Update dotnet sdk version and remove IIsoManager 2020-12-03 07:52:32 -07:00
artiumeandGitHub 8ae0207131 add additional UUID gen methods 2020-07-17 14:49:55 -04:00
Joshua M. Boniface edff9891d8 Add licensing blurb to README 2020-06-16 12:31:21 -04:00
dkanada 888677b117 update metadata and remove deprecated checkbox method 2020-05-26 22:11:35 +09:00
Niels van Velzen 126a0eb6b6 Update to .NET 2.1 and Jellyfin 10.5 2020-03-09 21:17:32 +01:00
dkanadaandGitHub e70a1f09df Merge branch 'master' into dkanada-patch-1 2020-01-21 14:53:23 +09:00
dkanada 644088bad2 make some readme changes 2020-01-21 13:03:21 +09:00
dkanadaandGitHub 6afbcbb0eb update some documentation links 2020-01-21 12:40:24 +09:00
Anthony LavadoandGitHub 3a9152eb8b Change link to contribution guide
Changes the link to the docs to be the contribution guide, as that will be the best starting point.
2019-09-30 18:08:23 -04:00
Anthony LavadoandGitHub 36d6c99a74 Update links
Removes reference to other GitHub repo for the template, and uses the one in this repo.
Updates documentation link to new location.
2019-09-30 18:05:39 -04:00
Arun MahapatraandGitHub e3fe274d51 Fix links to example project in readme 2019-08-17 15:52:46 +05:30
LogicalPhallacyandGitHub a14d1d988d remove missing weather interface
the interfaces in general need a little more attention and love.
2019-03-25 23:58:27 -07:00
LogicalPhallacyandGitHub dbe5b1f311 Added plugin license info, fixed urls 2019-03-07 23:53:59 -08:00
Phallacy 0f54a9b89d Updated readme with dotnet template 2019-03-03 01:51:09 -08:00
Phallacy 5af09f0fd5 Updated readme with example plugin link, minor gitignore update 2019-02-21 01:59:47 -08:00
Phallacy e2f35ac6cc initial readme, gitignore 2019-02-21 00:36:01 -08:00
LogicalPhallacyandGitHub b4d5cd8bb1 Initial commit 2019-02-20 21:59:28 -08:00