Update SixLabors.ImageSharp, MailKit, DryIoc libraries

This commit is contained in:
Stepan Goremykin 2023-03-30 21:56:54 -07:00 committed by GitHub
parent 2c7eb05b52
commit 2abbee1032
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 45 additions and 48 deletions

View File

@ -4,7 +4,7 @@
<DefineConstants Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64' or '$(RuntimeIdentifier)' == 'linux-musl-arm64'">ISMUSL</DefineConstants> <DefineConstants Condition="'$(RuntimeIdentifier)' == 'linux-musl-x64' or '$(RuntimeIdentifier)' == 'linux-musl-arm64'">ISMUSL</DefineConstants>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DryIoc.dll" Version="5.3.0" /> <PackageReference Include="DryIoc.dll" Version="5.3.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.1" /> <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

View File

@ -42,11 +42,9 @@ namespace NzbDrone.Core.MediaCover
try try
{ {
using (var image = Image.Load(source)) using var image = Image.Load(source);
{ image.Mutate(x => x.Resize(0, height));
image.Mutate(x => x.Resize(0, height)); image.Save(destination);
image.Save(destination);
}
} }
catch catch
{ {

View File

@ -8,7 +8,6 @@ using MimeKit;
using NLog; using NLog;
using NzbDrone.Common.Extensions; using NzbDrone.Common.Extensions;
using NzbDrone.Common.Http.Dispatchers; using NzbDrone.Common.Http.Dispatchers;
using NzbDrone.Core.Security;
namespace NzbDrone.Core.Notifications.Email namespace NzbDrone.Core.Notifications.Email
{ {
@ -110,47 +109,45 @@ namespace NzbDrone.Core.Notifications.Email
private void Send(MimeMessage email, EmailSettings settings) private void Send(MimeMessage email, EmailSettings settings)
{ {
using (var client = new SmtpClient()) using var client = new SmtpClient();
client.Timeout = 10000;
var serverOption = SecureSocketOptions.Auto;
if (settings.RequireEncryption)
{ {
client.Timeout = 10000; if (settings.Port == 465)
var serverOption = SecureSocketOptions.Auto;
if (settings.RequireEncryption)
{ {
if (settings.Port == 465) serverOption = SecureSocketOptions.SslOnConnect;
{
serverOption = SecureSocketOptions.SslOnConnect;
}
else
{
serverOption = SecureSocketOptions.StartTls;
}
} }
else
client.ServerCertificateValidationCallback = _certificateValidationService.ShouldByPassValidationError;
_logger.Debug("Connecting to mail server");
client.Connect(settings.Server, settings.Port, serverOption);
if (!string.IsNullOrWhiteSpace(settings.Username))
{ {
_logger.Debug("Authenticating to mail server"); serverOption = SecureSocketOptions.StartTls;
client.Authenticate(settings.Username, settings.Password);
} }
_logger.Debug("Sending to mail server");
client.Send(email);
_logger.Debug("Sent to mail server, disconnecting");
client.Disconnect(true);
_logger.Debug("Disconnecting from mail server");
} }
client.ServerCertificateValidationCallback = _certificateValidationService.ShouldByPassValidationError;
_logger.Debug("Connecting to mail server");
client.Connect(settings.Server, settings.Port, serverOption);
if (!string.IsNullOrWhiteSpace(settings.Username))
{
_logger.Debug("Authenticating to mail server");
client.Authenticate(settings.Username, settings.Password);
}
_logger.Debug("Sending to mail server");
client.Send(email);
_logger.Debug("Sent to mail server, disconnecting");
client.Disconnect(true);
_logger.Debug("Disconnecting from mail server");
} }
public ValidationFailure Test(EmailSettings settings) public ValidationFailure Test(EmailSettings settings)

View File

@ -4,7 +4,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Dapper" Version="2.0.123" /> <PackageReference Include="Dapper" Version="2.0.123" />
<PackageReference Include="MailKit" Version="2.10.1" /> <PackageReference Include="MailKit" Version="3.6.0" />
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="6.0.15" /> <PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="6.0.15" />
<PackageReference Include="Servarr.FFMpegCore" Version="4.7.0-26" /> <PackageReference Include="Servarr.FFMpegCore" Version="4.7.0-26" />
<PackageReference Include="Servarr.FFprobe" Version="5.1.2.106" /> <PackageReference Include="Servarr.FFprobe" Version="5.1.2.106" />
@ -15,7 +15,7 @@
<PackageReference Include="FluentMigrator.Runner" Version="3.3.2" /> <PackageReference Include="FluentMigrator.Runner" Version="3.3.2" />
<PackageReference Include="FluentMigrator.Runner.SQLite" Version="3.3.2" /> <PackageReference Include="FluentMigrator.Runner.SQLite" Version="3.3.2" />
<PackageReference Include="FluentValidation" Version="8.6.2" /> <PackageReference Include="FluentValidation" Version="8.6.2" />
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" /> <PackageReference Include="SixLabors.ImageSharp" Version="3.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="4.7.14" /> <PackageReference Include="NLog" Version="4.7.14" />
<PackageReference Include="MonoTorrent" Version="2.0.7" /> <PackageReference Include="MonoTorrent" Version="2.0.7" />

View File

@ -9,8 +9,8 @@
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0" /> <PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" /> <PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.1" /> <PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.1" />
<PackageReference Include="DryIoc.dll" Version="5.3.0" /> <PackageReference Include="DryIoc.dll" Version="5.3.4" />
<PackageReference Include="DryIoc.Microsoft.DependencyInjection" Version="6.1.0" /> <PackageReference Include="DryIoc.Microsoft.DependencyInjection" Version="6.1.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\NzbDrone.Common\Sonarr.Common.csproj" /> <ProjectReference Include="..\NzbDrone.Common\Sonarr.Common.csproj" />

View File

@ -4,8 +4,8 @@
<TargetFrameworks>net6.0</TargetFrameworks> <TargetFrameworks>net6.0</TargetFrameworks>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DryIoc.dll" Version="5.3.0" /> <PackageReference Include="DryIoc.dll" Version="5.3.4" />
<PackageReference Include="DryIoc.Microsoft.DependencyInjection" Version="6.1.0" /> <PackageReference Include="DryIoc.Microsoft.DependencyInjection" Version="6.1.1" />
<PackageReference Include="NLog" Version="4.7.14" /> <PackageReference Include="NLog" Version="4.7.14" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Sonarr/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>