Explorar el Código

exclude defunct assemblies

Luke Pulverenti hace 8 años
padre
commit
f6acc5fbff
Se han modificado 1 ficheros con 14 adiciones y 0 borrados
  1. 14 0
      MediaBrowser.Server.Startup.Common/ApplicationHost.cs

+ 14 - 0
MediaBrowser.Server.Startup.Common/ApplicationHost.cs

@@ -1273,6 +1273,7 @@ namespace MediaBrowser.Server.Startup.Common
             try
             {
                 return Directory.EnumerateFiles(ApplicationPaths.PluginsPath, "*.dll", SearchOption.TopDirectoryOnly)
+                    .Where(EnablePlugin)
                     .Select(LoadAssembly)
                     .Where(a => a != null)
                     .ToList();
@@ -1283,6 +1284,19 @@ namespace MediaBrowser.Server.Startup.Common
             }
         }
 
+        private bool EnablePlugin(string path)
+        {
+            var filename = Path.GetFileName(path);
+
+            var exclude = new[]
+            {
+                "mbplus.dll",
+                "mbintros.dll"
+            };
+
+            return !exclude.Contains(filename ?? string.Empty, StringComparer.OrdinalIgnoreCase);
+        }
+
         /// <summary>
         /// Gets the system status.
         /// </summary>