Merge branch 'dev' into reformat

This commit is contained in:
Erwin de Haan 2019-01-13 21:59:37 +01:00 committed by GitHub
commit 9d0a08571e
6 changed files with 40 additions and 22 deletions

View File

@ -15,7 +15,10 @@ WORKDIR /repo
COPY . .
RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \
&& dotnet clean \
&& dotnet publish --configuration release --output /jellyfin
&& dotnet publish \
--configuration release \
--output /jellyfin \
Jellyfin.Server
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime

View File

@ -6,7 +6,10 @@ COPY . .
RUN export DOTNET_CLI_TELEMETRY_OPTOUT=1 \
&& find . -type f -exec sed -i 's/netcoreapp2.1/netcoreapp3.0/g' {} \; \
&& dotnet clean \
&& dotnet publish --configuration release --output /jellyfin
&& dotnet publish \
--configuration release \
--output /jellyfin \
Jellyfin.Server
FROM microsoft/dotnet:${DOTNET_VERSION}-runtime
COPY --from=builder /jellyfin /jellyfin

View File

@ -48,12 +48,13 @@ namespace Emby.Drawing.Common
/// <exception cref="ArgumentException">The image was of an unrecognised format.</exception>
public static ImageSize GetDimensions(string path, ILogger logger, IFileSystem fileSystem)
{
var extension = Path.GetExtension(path);
if (string.IsNullOrEmpty(extension))
if (string.IsNullOrEmpty(path))
{
throw new ArgumentException("ImageHeader doesn't support image file");
throw new ArgumentNullException(nameof(path));
}
string extension = Path.GetExtension(path).ToLower();
if (!SupportedExtensions.Contains(extension))
{
throw new ArgumentException("ImageHeader doesn't support " + extension);

View File

@ -156,7 +156,7 @@ namespace Emby.Server.Implementations.IO
continue;
}
Logger.LogInformation("{name} ({path}}) will be refreshed.", item.Name, item.Path);
Logger.LogInformation("{name} ({path}) will be refreshed.", item.Name, item.Path);
try
{

View File

@ -20,6 +20,13 @@
<EmbeddedResource Include="Resources/Configuration/*" />
</ItemGroup>
<!-- Code analysers-->
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.3" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2" />
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />

View File

@ -1,8 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@ -126,6 +126,10 @@ namespace Rssdp.Infrastructure
{
_BroadcastListenSocket = ListenForBroadcastsAsync();
}
catch (SocketException ex)
{
_logger.LogError("Failed to bind to port 1900: {Message}. DLNA will be unavailable", ex.Message);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error in BeginListeningForBroadcasts");
@ -145,7 +149,7 @@ namespace Rssdp.Infrastructure
{
if (_BroadcastListenSocket != null)
{
_logger.LogInformation("{0} disposing _BroadcastListenSocket.", GetType().Name);
_logger.LogInformation("{0} disposing _BroadcastListenSocket", GetType().Name);
_BroadcastListenSocket.Dispose();
_BroadcastListenSocket = null;
}