147 Commits
Author SHA1 Message Date
Gitea Actions 17bb9a1e8a Update manifest.json for version 0.0.4.0 2026-08-09 08:59:11 +00:00
dtourolleandClaude Opus 5 44ab98e082 Set version to 0.0.4
🏗️ Build Plugin / build (push) Successful in 36s
🧪 Test Plugin / test (push) Successful in 34s
🚀 Release Plugin / build-and-release (push) Successful in 47s
Dynamic group creation fix on top of 0.0.3.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
v0.0.4.0
2026-08-09 10:56:36 +02:00
dtourolleandClaude Opus 5 bb8814644c Set the shared account's password before claiming it
Provisioning assigned AuthenticationProviderId and only then called
IUserManager.ChangePassword. Jellyfin dispatches that call to the provider the
user is currently assigned to, so it reached this plugin's own ChangePassword,
which refuses by design. Creating a group by typing "alice+bob" at the login
screen therefore died with NotSupportedException.

Set the placeholder password first, while the freshly created account is still
on Jellyfin's default provider, then claim it.

The new end-to-end tests wire the real provisioning, group and authentication
services together rather than mocking IProvisioningService, and cover a group
created on demand being unlocked afterwards by either member's password. With
the old ordering restored, six of them fail with the original exception.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 10:56:36 +02:00
Gitea Actions 69f7a87cef Update manifest.json for version 0.0.3.0 2026-08-09 08:49:28 +00:00
dtourolleandClaude Opus 5 fd08d7ea1a Set version to 0.0.3
🏗️ Build Plugin / build (push) Successful in 1m43s
🧪 Test Plugin / test (push) Successful in 37s
🚀 Release Plugin / build-and-release (push) Successful in 45s
Startup-crash fix on top of 0.0.2.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
v0.0.3.0
2026-08-09 10:46:09 +02:00
dtourolleandClaude Opus 5 da779514fe Resolve the group services lazily in the authentication provider
Jellyfin's UserManager constructor-injects every IAuthenticationProvider, so
building IUserManager forced SharedAccountAuthenticationProvider to be built
first. That provider eagerly required IGroupService and IDynamicGroupService,
both of which need IUserManager, and the container refused to start the server
with "a circular dependency was detected".

Take the two group services as Lazy<T> and dereference them at authentication
time instead. Nobody can log in before the host is up, so the deferred lookup
is always safe. Microsoft's container has no built-in Lazy<T> support, hence
the explicit factory registrations.

The accompanying test builds the service graph through a stand-in that mimics
UserManager's constructor shape and validates it on build, so a reintroduced
cycle fails in CI rather than at server startup.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 10:46:09 +02:00
Gitea Actions dfab79e92a Update manifest.json for version 0.0.2 2026-07-31 07:45:09 +00:00
dtourolle f430d288ea Set version to 0.0.2
🏗️ Build Plugin / build (push) Successful in 34s
🧪 Test Plugin / test (push) Successful in 35s
🚀 Release Plugin / build-and-release (push) Successful in 46s
Order-independent group resolution on top of 0.0.1.
v0.0.2
2026-07-31 09:43:12 +02:00
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
Gitea Actions cb95a317d0 Update manifest.json for version 0.0.1 2026-07-29 22:17:29 +00:00
dtourolle a2780915bb Install nodejs in the builder image and fix a flaky intersection test
🏗️ Build Plugin / build (push) Successful in 1m10s
🧪 Test Plugin / test (push) Successful in 35s
🚀 Release Plugin / build-and-release (push) Failing after 33s
Two CI fixes.

The builder image lacked nodejs, so every job died at the first step with
"exec: node: executable file not found in $PATH" (exit 127).
actions/checkout and actions/cache are JavaScript actions: the runner
execs node inside the job container to run them, so the image needs it
even though the build itself does not. Verified by exec'ing node with no
shell, which is how the runner invokes it, and by pulling the pushed
image back from the registry.

TwoExplicitLists_IntersectToTheCommonLibraries compared a sorted actual
against an unsorted hardcoded expected, so it only passed when the
randomly generated library GUIDs happened to sort that way - it failed
about half of all runs and would have made CI intermittently red. The
intersection is a set, so it now asserts on membership and count rather
than ordering. Confirmed with 10 consecutive clean runs, up from ~50%.
v0.0.1
2026-07-30 00:10:34 +02:00
dtourolle 92c7dcb871 Set version to 0.0.1 and pin assembly identity for CI builds
🏗️ Build Plugin / build (push) Successful in 37s
🚀 Release Plugin / build-and-release (push) Failing after 30s
🧪 Test Plugin / test (push) Failing after 33s
The release and nightly workflows stamp a date-based version into
build.yaml (1.0.20260729.42). That build segment exceeds the 16-bit
limit AssemblyVersion and FileVersion require, so it would fail the
compile with CS7034 if it reached them.

Directory.Build.targets is imported after Directory.Build.props and is
not rewritten by CI, so pinning the assembly identity there keeps those
builds working. The manifest version is untouched - Jellyfin identifies
plugins by GUID plus manifest version, not assembly version. Verified by
building with a date-based version injected.
2026-07-29 00:17:10 +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
T-GanderandGitHub 6277846394 Fixed plugin template to build and copy correctly, allowing settings button to show and the plugin to register. (#84) 2025-11-23 06:19:48 -07:00
Bond-009andGitHub d544b71939 Merge pull request #79 from jakobkukla/patch-1
Fix vscode build task for NET 8
2025-03-11 09:33:59 +01:00
Jakob KuklaandGitHub 12988e127f Fix vscode build task for .NET 8 2025-03-04 00:55:32 +01:00
Anthony LavadoandGitHub e9312af2c2 Merge pull request #72 from jellyfin/renovate/jellyfin.controller-10.x 2024-10-05 11:42:18 -04:00
renovate[bot]andGitHub 4291891dfd Update dependency Jellyfin.Controller to 10.9.11 2024-10-05 15:20:24 +00:00
Anthony LavadoandGitHub e9c9f334cd Merge pull request #74 from Shadowghost/upgrade-template 2024-10-05 11:20:08 -04: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
Anthony LavadoandGitHub 74da0d2568 Merge pull request #54 from carif/linux 2024-10-05 11:01:16 -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
Bond-009andGitHub 5f4229e0fd Merge pull request #66 from ReenigneArcher/patch-1
chore(deps): bump Jellyfin.Controller and Jellyfin.Model to 10.8.13
2024-01-12 22:38:00 +01:00
ReenigneArcherandGitHub 4c4b1e5a71 chore(deps): bump Jellyfin.Controller and Jellyfin.Model to 10.8.13 2023-12-12 23:14:20 -05:00
mrnoname1000andGitHub 7fe332f29c README.md: Fix sh UUID generator
And make call to head POSIX-compliant
2023-10-19 23:35:44 +00:00
Bond-009andGitHub 9052fe20be Merge pull request #64 from jellyfin/renovate/stylecop.analyzers-1.x
chore(deps): update dependency stylecop.analyzers to v1.2.0-beta.507
2023-08-16 18:50:53 +02:00
renovate[bot]andGitHub 3c3776cc60 chore(deps): update dependency stylecop.analyzers to v1.2.0-beta.507 2023-07-03 05:49:33 +00:00
Johannes KauffmannandGitHub 0cb471baa2 Fix typo in interface name (#61) 2023-06-30 18:23:54 -06:00
Anthony LavadoandGitHub b282d676f4 Merge pull request #60 from zjeffer/patch-1
(chore: README.md) change codeblock language to `jsonc`
2023-05-05 21:32:28 -04: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
ViperiniusandGitHub 89500d8f8e Fix typo in class name for input label (#59) 2023-02-19 15:37:37 -07:00
Cody RobiberoandGitHub d3a60b5f71 Merge pull request #43 from SenorSmartyPants/FixSave
Don't navigate to another page, display saved settings instead
2022-08-13 14:45:52 -06:00
Patrick Farwick 4de36a8abc Add required extensions to Visual Studio Code 2022-07-07 16:48:24 +02:00
Patrick Farwick 66bac259a8 Add linux support for vscode dev-setup
The ${env:XDG_DATA_HOME} variable is not used, as this variable resolves
to the current working directory within Visual Studio Code's development
container. By manually specifying the file path, it is possible to use
Visual Studio Code's development container.

The "mkdir" command uses the "-p" flag. This flag creates the parent
directories, as well. Should they already exists, the command moves
down to the next folder to create without throwing an error.

The "-r" parameter of the "cp" is required to recursively copy all
files and directories within the "publish" directory.
2022-07-07 16:47:17 +02:00
Joshua M. BonifaceandGitHub c71657dfce Merge pull request #53 from oddstr13/pr-10.8-1
Target Jellyfin 10.8
2022-06-24 18:12:06 -04:00
Odd Stråbø ccc02d3ce0 Target Jellyfin 10.8 2022-06-24 16:49:01 +02:00
Cody RobiberoandGitHub 06c07ad6c0 Merge pull request #49 from matthewstrasiotto/master 2022-06-12 08:04:12 -06:00
Cody RobiberoandGitHub 90ae8c13e0 Merge pull request #52 from h1dden-da3m0n/fix/bump-ci 2022-05-15 20:35:34 -04:00
K3rnelPan1c b86bd1fab9 fix: meta ci workflows 2022-05-15 23:24:15 +02:00
Matthew Strasiotto 5e63c884e8 Update README to reflect new .vscode structure 2022-04-23 20:19:25 +10:00
Matthew Strasiotto 10e53111ea Comment vscode settings and tasks 2022-04-23 19:57:31 +10:00
Matthew Strasiotto 7735d7e402 Add .vscode tasks + launch configs 2022-04-23 19:44:24 +10:00
Cody RobiberoandGitHub 08963d4c70 Merge pull request #46 from jellyfin/ci 2022-03-19 13:36:23 -06:00
4afb53ea6d Apply suggestions from code review
Co-authored-by: K3rnelPan1c <33120068+h1dden-da3m0n@users.noreply.github.com>
2022-03-19 10:01:24 -06:00
Cody Robibero 144b31bf15 Use meta ci 2022-03-19 08:41:09 -06:00
Cody RobiberoandGitHub 7af4869ba2 Merge pull request #44 from jellyfin/dependabot/github_actions/actions/setup-dotnet-2
ci(deps): bump actions/setup-dotnet from 1 to 2
2022-03-19 06:52:57 -06:00
dependabot[bot]andGitHub 9cc8711a26 ci(deps): bump actions/setup-dotnet from 1 to 2
Bumps [actions/setup-dotnet](https://github.com/actions/setup-dotnet) from 1 to 2.
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v1...v2)

---
updated-dependencies:
- dependency-name: actions/setup-dotnet
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 16:01:13 +00:00