From 5b6356e7795cfeadcb86ba731658733b494a9e8b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 4 Jun 2017 14:31:40 -0400 Subject: [PATCH] remove ImageMagick from Windows --- .../Emby.Common.Implementations.csproj | 5 +- Emby.Common.Implementations/packages.config | 2 +- Emby.Dlna/Profiles/DefaultProfile.cs | 2 +- Emby.Drawing.Skia/SkiaEncoder.cs | 15 +- Emby.Server.Core/Emby.Server.Core.csproj | 5 +- Emby.Server.Core/packages.config | 2 +- .../Library/UserManager.cs | 3 +- .../MediaBrowser.Server.Mono.csproj | 5 +- MediaBrowser.Server.Mono/packages.config | 2 +- .../ImageEncoderHelper.cs | 9 - .../MediaBrowser.ServerApplication.csproj | 878 +----------------- .../packages.config | 2 +- 12 files changed, 18 insertions(+), 912 deletions(-) diff --git a/Emby.Common.Implementations/Emby.Common.Implementations.csproj b/Emby.Common.Implementations/Emby.Common.Implementations.csproj index 567f29526..50d0d05ec 100644 --- a/Emby.Common.Implementations/Emby.Common.Implementations.csproj +++ b/Emby.Common.Implementations/Emby.Common.Implementations.csproj @@ -42,9 +42,8 @@ ..\packages\SharpCompress.0.14.0\lib\net45\SharpCompress.dll True - - ..\packages\SimpleInjector.4.0.7\lib\net45\SimpleInjector.dll - True + + ..\packages\SimpleInjector.4.0.8\lib\net45\SimpleInjector.dll diff --git a/Emby.Common.Implementations/packages.config b/Emby.Common.Implementations/packages.config index 9cc054db0..1e6b10c01 100644 --- a/Emby.Common.Implementations/packages.config +++ b/Emby.Common.Implementations/packages.config @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/Emby.Dlna/Profiles/DefaultProfile.cs b/Emby.Dlna/Profiles/DefaultProfile.cs index 70d08f9a9..06ce93640 100644 --- a/Emby.Dlna/Profiles/DefaultProfile.cs +++ b/Emby.Dlna/Profiles/DefaultProfile.cs @@ -70,7 +70,7 @@ namespace Emby.Dlna.Profiles new DirectPlayProfile { - Container = "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus,flac", + Container = "aac,mp3,mpa,wav,wma,mp2,ogg,oga,webma,ape,opus,flac,m4a", Type = DlnaProfileType.Audio } }; diff --git a/Emby.Drawing.Skia/SkiaEncoder.cs b/Emby.Drawing.Skia/SkiaEncoder.cs index 222ecf733..8a38b9248 100644 --- a/Emby.Drawing.Skia/SkiaEncoder.cs +++ b/Emby.Drawing.Skia/SkiaEncoder.cs @@ -126,11 +126,11 @@ namespace Emby.Drawing.Skia for (int row = 0; row < bitmap.Height; ++row) { if (IsAllWhiteRow(bitmap, row)) - topmost = row; + topmost = row + 1; else break; } - int bottommost = 0; + int bottommost = bitmap.Height; for (int row = bitmap.Height - 1; row >= 0; --row) { if (IsAllWhiteRow(bitmap, row)) @@ -138,11 +138,11 @@ namespace Emby.Drawing.Skia else break; } - int leftmost = 0, rightmost = 0; + int leftmost = 0, rightmost = bitmap.Width; for (int col = 0; col < bitmap.Width; ++col) { if (IsAllWhiteColumn(bitmap, col)) - leftmost = col; + leftmost = col + 1; else break; } @@ -162,13 +162,6 @@ namespace Emby.Drawing.Skia using (var subset = image.Subset(newRect)) { return SKBitmap.FromImage(subset); - //using (var data = subset.Encode(StripCollageBuilder.GetEncodedFormat(outputPath), 90)) - //{ - // using (var fileStream = _fileSystem.GetFileStream(outputPath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) - // { - // data.AsStream().CopyTo(fileStream); - // } - //} } } } diff --git a/Emby.Server.Core/Emby.Server.Core.csproj b/Emby.Server.Core/Emby.Server.Core.csproj index 01193bb6c..063ef6eb9 100644 --- a/Emby.Server.Core/Emby.Server.Core.csproj +++ b/Emby.Server.Core/Emby.Server.Core.csproj @@ -41,9 +41,8 @@ ..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll True - - ..\packages\SimpleInjector.4.0.7\lib\net45\SimpleInjector.dll - True + + ..\packages\SimpleInjector.4.0.8\lib\net45\SimpleInjector.dll diff --git a/Emby.Server.Core/packages.config b/Emby.Server.Core/packages.config index 24e8a26b6..6311b55eb 100644 --- a/Emby.Server.Core/packages.config +++ b/Emby.Server.Core/packages.config @@ -2,5 +2,5 @@ - + \ No newline at end of file diff --git a/Emby.Server.Implementations/Library/UserManager.cs b/Emby.Server.Implementations/Library/UserManager.cs index 0b9027291..8e8f8c4dc 100644 --- a/Emby.Server.Implementations/Library/UserManager.cs +++ b/Emby.Server.Implementations/Library/UserManager.cs @@ -202,8 +202,7 @@ namespace Emby.Server.Implementations.Library private bool IsValidUsernameCharacter(char i) { - return char.IsLetterOrDigit(i) || char.Equals(i, '-') || char.Equals(i, '_') || char.Equals(i, '\'') || - char.Equals(i, '.'); + return !char.Equals(i, '<') && !char.Equals(i, '>'); } public string MakeValidUsername(string username) diff --git a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj index f515f5a68..ed5e4d96e 100644 --- a/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj +++ b/MediaBrowser.Server.Mono/MediaBrowser.Server.Mono.csproj @@ -60,9 +60,8 @@ ..\packages\SharpCompress.0.14.0\lib\net45\SharpCompress.dll True - - ..\packages\SimpleInjector.4.0.7\lib\net45\SimpleInjector.dll - True + + ..\packages\SimpleInjector.4.0.8\lib\net45\SimpleInjector.dll ..\packages\SQLitePCLRaw.core.1.1.5\lib\net45\SQLitePCLRaw.core.dll diff --git a/MediaBrowser.Server.Mono/packages.config b/MediaBrowser.Server.Mono/packages.config index 4f1b09ac8..85f3d58b0 100644 --- a/MediaBrowser.Server.Mono/packages.config +++ b/MediaBrowser.Server.Mono/packages.config @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/MediaBrowser.ServerApplication/ImageEncoderHelper.cs b/MediaBrowser.ServerApplication/ImageEncoderHelper.cs index a6651ea40..56729e74c 100644 --- a/MediaBrowser.ServerApplication/ImageEncoderHelper.cs +++ b/MediaBrowser.ServerApplication/ImageEncoderHelper.cs @@ -30,15 +30,6 @@ namespace MediaBrowser.Server.Startup.Common logger.Error("Error loading Skia. Will revert to ImageMagick."); } - try - { - return new ImageMagickEncoder(logManager.GetLogger("ImageMagick"), appPaths, httpClient, fileSystem); - } - catch - { - logger.Error("Error loading ImageMagick. Will revert to GDI."); - } - return new NullImageEncoder(); } } diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj index 32b93db00..14b186b72 100644 --- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj +++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj @@ -88,9 +88,8 @@ ..\packages\SharpCompress.0.14.0\lib\net45\SharpCompress.dll True - - ..\packages\SimpleInjector.4.0.7\lib\net45\SimpleInjector.dll - True + + ..\packages\SimpleInjector.4.0.8\lib\net45\SimpleInjector.dll ..\packages\SkiaSharp.1.58.0\lib\net45\SkiaSharp.dll @@ -191,886 +190,13 @@ MediaBrowser.Updater.exe PreserveNewest - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - PreserveNewest PreserveNewest - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - PreserveNewest diff --git a/MediaBrowser.ServerApplication/packages.config b/MediaBrowser.ServerApplication/packages.config index db675a901..9abd370f3 100644 --- a/MediaBrowser.ServerApplication/packages.config +++ b/MediaBrowser.ServerApplication/packages.config @@ -4,7 +4,7 @@ - +