浏览代码

dispose image magick environment on shutdown

Luke Pulverenti 10 年之前
父节点
当前提交
a0c6c259e6

+ 0 - 2
MediaBrowser.Model/Configuration/ServerConfiguration.cs

@@ -203,8 +203,6 @@ namespace MediaBrowser.Model.Configuration
         public bool EnableAudioArchiveFiles { get; set; }
         public bool EnableVideoArchiveFiles { get; set; }
 
-        public bool EnableLegacyCollectionInView { get; set; }
-
         /// <summary>
         /// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
         /// </summary>

+ 1 - 0
MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs

@@ -822,6 +822,7 @@ namespace MediaBrowser.Server.Implementations.Drawing
 
         public void Dispose()
         {
+            Wand.CloseEnvironment();
             _saveImageSizeTimer.Dispose();
         }
     }

+ 1 - 2
MediaBrowser.Server.Implementations/Library/UserViewManager.cs

@@ -85,8 +85,7 @@ namespace MediaBrowser.Server.Implementations.Library
                 list.Add(await GetUserView(CollectionType.Movies, string.Empty, cancellationToken).ConfigureAwait(false));
             }
 
-            if (foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.Games, StringComparison.OrdinalIgnoreCase))
-                || _config.Configuration.EnableLegacyCollectionInView)
+            if (foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.Games, StringComparison.OrdinalIgnoreCase)))
             {
                 list.Add(await GetUserView(CollectionType.Games, string.Empty, cancellationToken).ConfigureAwait(false));
             }

+ 1 - 1
MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json

@@ -69,7 +69,7 @@
     "ButtonAddToCollection": "Add to collection",
     "HeaderSelectCertificatePath": "Select Certificate Path",
     "ConfirmMessageScheduledTaskButton": "This operation normally runs automatically as a scheduled task. It can also be run manually here. To configure the scheduled task, see:",
-    "HeaderSupporterBenefit": "A supporter membership provides additional benefits such as access to premium plugins, internet channel content, and more. {0}Learn more{1}.",
+    "HeaderSupporterBenefit": "A supporter membership provides additional benefits such as access to sync, premium plugins, internet channel content, and more. {0}Learn more{1}.",
     "LabelSyncNoTargetsHelp": "It looks like you don't currently have any apps that support sync.",
     "HeaderWelcomeToMediaBrowserServerDashboard": "Welcome to the Media Browser Dashboard",
     "HeaderWelcomeToMediaBrowserWebClient": "Welcome to the Media Browser Web Client",

+ 3 - 2
MediaBrowser.ServerApplication/MainStartup.cs

@@ -1,4 +1,5 @@
-using MediaBrowser.Common.Implementations.Logging;
+using ImageMagickSharp;
+using MediaBrowser.Common.Implementations.Logging;
 using MediaBrowser.Model.Logging;
 using MediaBrowser.Server.Implementations;
 using MediaBrowser.Server.Startup.Common;
@@ -40,7 +41,7 @@ namespace MediaBrowser.ServerApplication
 
             var applicationPath = currentProcess.MainModule.FileName;
 
-            ImageMagickSharp.Wand.SetMagickCoderModulePath(Path.Combine(Path.GetDirectoryName(applicationPath), "ImageMagickCoders", "x86"));
+            Wand.SetMagickCoderModulePath(Path.Combine(Path.GetDirectoryName(applicationPath), "ImageMagickCoders", "x86"));
             var appPaths = CreateApplicationPaths(applicationPath, _isRunningAsService);
 
             var logManager = new NlogManager(appPaths.LogDirectoryPath, "server");