aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile5
-rw-r--r--Dockerfile.aarch645
-rw-r--r--Emby.Drawing/Common/ImageHeader.cs9
-rw-r--r--Emby.Server.Implementations/IO/FileRefresher.cs2
-rw-r--r--Jellyfin.Server/Jellyfin.Server.csproj33
-rw-r--r--RSSDP/SsdpCommunicationsServer.cs8
6 files changed, 40 insertions, 22 deletions
diff --git a/Dockerfile b/Dockerfile
index 75700e6f5..e4cbede80 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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
diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64
index da4acc841..cc70ef32f 100644
--- a/Dockerfile.aarch64
+++ b/Dockerfile.aarch64
@@ -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
diff --git a/Emby.Drawing/Common/ImageHeader.cs b/Emby.Drawing/Common/ImageHeader.cs
index 3939a1664..c08cdabb2 100644
--- a/Emby.Drawing/Common/ImageHeader.cs
+++ b/Emby.Drawing/Common/ImageHeader.cs
@@ -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);
diff --git a/Emby.Server.Implementations/IO/FileRefresher.cs b/Emby.Server.Implementations/IO/FileRefresher.cs
index dcf26fdaf..6bee178ea 100644
--- a/Emby.Server.Implementations/IO/FileRefresher.cs
+++ b/Emby.Server.Implementations/IO/FileRefresher.cs
@@ -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
{
diff --git a/Jellyfin.Server/Jellyfin.Server.csproj b/Jellyfin.Server/Jellyfin.Server.csproj
index a462539ad..02d8ab731 100644
--- a/Jellyfin.Server/Jellyfin.Server.csproj
+++ b/Jellyfin.Server/Jellyfin.Server.csproj
@@ -20,19 +20,26 @@
<EmbeddedResource Include="Resources/Configuration/*" />
</ItemGroup>
- <ItemGroup>
- <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="2.2.0" />
- <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" />
- <PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
- <PackageReference Include="Serilog.Settings.Configuration" Version="3.0.1" />
- <PackageReference Include="Serilog.Sinks.Async" Version="1.3.0" />
- <PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
- <PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
- <PackageReference Include="SkiaSharp" Version="1.68.0" />
- <PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="1.1.12" />
- <PackageReference Include="SQLitePCLRaw.core" Version="1.1.12" />
- <PackageReference Include="SQLitePCLRaw.provider.sqlite3.netstandard11" Version="1.1.12" />
- </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" />
+ <PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
+ <PackageReference Include="Serilog.Settings.Configuration" Version="3.0.1" />
+ <PackageReference Include="Serilog.Sinks.Async" Version="1.3.0" />
+ <PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
+ <PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
+ <PackageReference Include="SkiaSharp" Version="1.68.0" />
+ <PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" Version="1.1.12" />
+ <PackageReference Include="SQLitePCLRaw.core" Version="1.1.12" />
+ <PackageReference Include="SQLitePCLRaw.provider.sqlite3.netstandard11" Version="1.1.12" />
+ </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Emby.Drawing\Emby.Drawing.csproj" />
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs
index abd0dbdad..04e76ef59 100644
--- a/RSSDP/SsdpCommunicationsServer.cs
+++ b/RSSDP/SsdpCommunicationsServer.cs
@@ -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;
}