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>
52 lines
2.1 KiB
XML
52 lines
2.1 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<!-- Mirrors the plugin: each framework is tested against the Jellyfin generation it ships for. -->
|
|
<TargetFrameworks>net9.0;net10.0</TargetFrameworks>
|
|
<Nullable>enable</Nullable>
|
|
<IsPackable>false</IsPackable>
|
|
<!-- Test code is exempt from the strict analyzer profile the plugin itself uses. -->
|
|
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
|
|
<AnalysisMode>Default</AnalysisMode>
|
|
<GenerateDocumentationFile>false</GenerateDocumentationFile>
|
|
<NoWarn>$(NoWarn);CA1707;SA0001;CS1591</NoWarn>
|
|
<!--
|
|
The net9.0 build matches Jellyfin 10.11's ABI, but a machine may only have a newer runtime
|
|
installed. Rolling the test host forward to the latest major lets the suite run without
|
|
pinning developers to a .NET 9 runtime.
|
|
-->
|
|
<RollForward>LatestMajor</RollForward>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0'">
|
|
<DefineConstants>$(DefineConstants);JELLYFIN_12</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
|
|
<PackageReference Include="xunit" Version="2.9.2" />
|
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
|
|
<PackageReference Include="Moq" Version="4.20.72" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="../Jellyfin.Plugin.WatchedTogether/Jellyfin.Plugin.WatchedTogether.csproj" />
|
|
</ItemGroup>
|
|
|
|
<!--
|
|
The plugin excludes the runtime assets of these packages because the Jellyfin server supplies
|
|
them at load time. Tests run without a server, so they need the real assemblies copied to the
|
|
output directory.
|
|
-->
|
|
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
|
|
<PackageReference Include="Jellyfin.Controller" Version="10.11.5" />
|
|
<PackageReference Include="Jellyfin.Model" Version="10.11.5" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
|
|
<PackageReference Include="Jellyfin.Controller" Version="12.0.0" />
|
|
<PackageReference Include="Jellyfin.Model" Version="12.0.0" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|