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 /// The image was of an unrecognised format. 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 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + 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; }