diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Common/Compute.cs | 2 | ||||
| -rw-r--r-- | src/slskd/Common/Extensions.cs | 2 | ||||
| -rw-r--r-- | src/slskd/Integrations/FTP/FTPService.cs | 2 | ||||
| -rw-r--r-- | src/slskd/Startup.cs | 2 | ||||
| -rw-r--r-- | src/slskd/slskd.csproj | 12 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/slskd/Common/Compute.cs b/src/slskd/Common/Compute.cs index 464a932d..eacaedf1 100644 --- a/src/slskd/Common/Compute.cs +++ b/src/slskd/Common/Compute.cs @@ -41,7 +41,7 @@ namespace slskd public static string Sha1Hash(string str) { - using var sha1 = new SHA1Managed(); + using var sha1 = SHA1.Create(); return BitConverter.ToString(sha1.ComputeHash(Encoding.UTF8.GetBytes(str))).Replace("-", string.Empty); } diff --git a/src/slskd/Common/Extensions.cs b/src/slskd/Common/Extensions.cs index 678b790c..4d463092 100644 --- a/src/slskd/Common/Extensions.cs +++ b/src/slskd/Common/Extensions.cs @@ -295,7 +295,7 @@ namespace slskd var options = new JsonSerializerOptions(); options.Converters.Add(new IPAddressConverter()); options.Converters.Add(new JsonStringEnumConverter()); - options.IgnoreNullValues = true; + options.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull; return options; } } diff --git a/src/slskd/Integrations/FTP/FTPService.cs b/src/slskd/Integrations/FTP/FTPService.cs index dd1b340f..32b8b253 100644 --- a/src/slskd/Integrations/FTP/FTPService.cs +++ b/src/slskd/Integrations/FTP/FTPService.cs @@ -62,7 +62,7 @@ namespace slskd.Integrations.FTP { if (!FtpOptions.Enabled) { - Log.LogDebug("Skipping FTP upload of {filename}; FTP integration is disabled"); + Log.LogDebug("Skipping FTP upload of {filename}; FTP integration is disabled", filename); return; } diff --git a/src/slskd/Startup.cs b/src/slskd/Startup.cs index a8b64305..ac4a2789 100644 --- a/src/slskd/Startup.cs +++ b/src/slskd/Startup.cs @@ -169,7 +169,7 @@ namespace slskd { options.JsonSerializerOptions.Converters.Add(new IPAddressConverter()); options.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter()); - options.JsonSerializerOptions.IgnoreNullValues = true; + options.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull; }); services.AddSignalR().AddJsonProtocol(options => diff --git a/src/slskd/slskd.csproj b/src/slskd/slskd.csproj index 8e3739d9..5de36e78 100644 --- a/src/slskd/slskd.csproj +++ b/src/slskd/slskd.csproj @@ -8,7 +8,7 @@ </PropertyGroup> <PropertyGroup> - <TargetFramework>net5.0</TargetFramework> + <TargetFramework>net6.0</TargetFramework> <LangVersion>9.0</LangVersion> <CodeAnalysisRuleSet>Properties\analysis.ruleset</CodeAnalysisRuleSet> <GenerateDocumentationFile>true</GenerateDocumentationFile> @@ -43,15 +43,15 @@ <ItemGroup> <PackageReference Include="FluentFTP" Version="35.0.5" /> - <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.11" /> + <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.0.0" /> - <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3"> + <PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> </PackageReference> - <PackageReference Include="Microsoft.Data.Sqlite" Version="5.0.11" /> - <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.11" /> - <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="5.0.11" /> + <PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.0" /> + <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.0" /> + <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="6.0.0" /> <PackageReference Include="prometheus-net" Version="5.0.1" /> <PackageReference Include="prometheus-net.AspNetCore" Version="5.0.1" /> <PackageReference Include="prometheus-net.AspNetCore.HealthChecks" Version="5.0.1" /> |
