The Free Software Media System - Server Backend & API
remove core plugin output from source control
LukePulverenti509156cbc349
diff --git a/.gitignore b/.gitignoreindex 4922421b78..0535685c3a 100644--- a/.gitignore+++ b/.gitignore@@ -31,6 +31,7 @@ local.properties################### Media Browser#################+CorePlugins*/ProgramData*/ProgramData-Server*/ProgramData-UI*/diff --git a/.hgignore b/.hgignoredeleted file mode 100644index c5c5c48773..0000000000--- a/.hgignore+++ /dev/null@@ -1,49 +0,0 @@-# use glob syntax-syntax: glob--*.obj-*.pdb-*.user-*.aps-*.pch-*.vspscc-*.vssscc-*_i.c-*_p.c-*.ncb-*.suo-*.tlb-*.tlh-*.bak-*.cache-*.ilk-*.log-*.lib-*.sbr-*.scc-*.psess-*.vsp-*.vspx-*.orig-*.rej-*.sdf-*.opensdf-*.ipch-[Bb]in-[Dd]ebug*/-obj/-[Rr]elease*/-ProgramData*/-ProgramData-Server*/-ProgramData-UI*/-_ReSharper*/-[Tt]humbs.db-[Tt]est[Rr]esult*-[Bb]uild[Ll]og.*-*.[Pp]ublish.xml-*.resharper--# ncrunch files-*.ncrunchsolution-*.ncrunchproject-Setup/*diff --git a/.hgtags b/.hgtagsdeleted file mode 100644index 4972205707..0000000000--- a/.hgtags+++ /dev/null@@ -1,5 +0,0 @@-811bcaa9490681194bd72a01c4b0f91d78a0ec97 CO Version 0.12.12.25-811bcaa9490681194bd72a01c4b0f91d78a0ec97 CO Version 0.12.12.25-0000000000000000000000000000000000000000 CO Version 0.12.12.25-0000000000000000000000000000000000000000 CO Version 0.12.12.25-e98137e38224a0d82cd7d98a71264e0cddc91ca4 CO Version 0.12.12.25diff --git a/MediaBrowser.Api/MediaBrowser.Api.csproj b/MediaBrowser.Api/MediaBrowser.Api.csprojindex baa515fb20..ed3a1b3430 100644--- a/MediaBrowser.Api/MediaBrowser.Api.csproj+++ b/MediaBrowser.Api/MediaBrowser.Api.csproj@@ -148,7 +148,7 @@<ItemGroup /><Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /><PropertyGroup>- <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\" /y</PostBuildEvent>+ <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\CorePlugins\" /y</PostBuildEvent></PropertyGroup><Import Project="$(SolutionDir)\.nuget\nuget.targets" /><!-- To modify your build process, add your task inside one of the targets below and uncomment it.diff --git a/MediaBrowser.ApiInteraction.Javascript/MediaBrowser.ApiInteraction.Javascript.csproj b/MediaBrowser.ApiInteraction.Javascript/MediaBrowser.ApiInteraction.Javascript.csprojindex e91c72670c..984a28ad71 100644--- a/MediaBrowser.ApiInteraction.Javascript/MediaBrowser.ApiInteraction.Javascript.csproj+++ b/MediaBrowser.ApiInteraction.Javascript/MediaBrowser.ApiInteraction.Javascript.csproj@@ -102,7 +102,7 @@</ItemGroup><Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /><PropertyGroup>- <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\" /y</PostBuildEvent>+ <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\CorePlugins\" /y</PostBuildEvent></PropertyGroup><Import Project="$(SolutionDir)\.nuget\nuget.targets" /><!-- To modify your build process, add your task inside one of the targets below and uncomment it.diff --git a/MediaBrowser.Common/Kernel/BaseKernel.cs b/MediaBrowser.Common/Kernel/BaseKernel.csindex a4cd81665c..616a0305c1 100644--- a/MediaBrowser.Common/Kernel/BaseKernel.cs+++ b/MediaBrowser.Common/Kernel/BaseKernel.cs@@ -3,7 +3,6 @@ using MediaBrowser.Common.IO;using MediaBrowser.Common.Localization;using MediaBrowser.Common.Mef;using MediaBrowser.Common.Net;-using MediaBrowser.Common.Net.Handlers;using MediaBrowser.Common.Plugins;using MediaBrowser.Common.ScheduledTasks;using MediaBrowser.Common.Serialization;@@ -17,7 +16,6 @@ using System;using System.Collections.Generic;using System.ComponentModel.Composition;using System.ComponentModel.Composition.Hosting;-using System.ComponentModel.Composition.Primitives;using System.Deployment.Application;using System.Diagnostics;using System.IO;@@ -517,6 +515,31 @@ namespace MediaBrowser.Common.Kernelyield return pluginAssembly;}+ var runningDirectory = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);+ var corePluginDirectory = Path.Combine(runningDirectory, "CorePlugins");++ // This will prevent the .dll file from getting locked, and allow us to replace it when needed+ pluginAssemblies = Directory.EnumerateFiles(corePluginDirectory, "*.dll", SearchOption.TopDirectoryOnly)+ .Select(file =>+ {+ try+ {+ return Assembly.Load(File.ReadAllBytes((file)));+ }+ catch (Exception ex)+ {+ _failedPluginAssemblies.Add(file);+ Logger.ErrorException("Error loading {0}", ex, file);+ return null;+ }++ }).Where(a => a != null);++ foreach (var pluginAssembly in pluginAssemblies)+ {+ yield return pluginAssembly;+ }+// Include composable parts in the Model assemblyyield return typeof (SystemInfo).Assembly;diff --git a/MediaBrowser.Common/Net/HttpServer.cs b/MediaBrowser.Common/Net/HttpServer.csindex efd6d9d325..7bb81c1ca1 100644--- a/MediaBrowser.Common/Net/HttpServer.cs+++ b/MediaBrowser.Common/Net/HttpServer.cs@@ -209,56 +209,52 @@ namespace MediaBrowser.Common.NetRaiseReceiveWebRequest(context);- Task.Run(() =>+ try{- try- {- ProcessRequest(context);- }- catch (InvalidOperationException ex)- {- HandleException(context.Response, ex, 422);-- throw;- }- catch (ResourceNotFoundException ex)- {- HandleException(context.Response, ex, 404);+ ProcessRequest(context);+ }+ catch (InvalidOperationException ex)+ {+ HandleException(context.Response, ex, 422);- throw;- }- catch (FileNotFoundException ex)- {- HandleException(context.Response, ex, 404);+ throw;+ }+ catch (ResourceNotFoundException ex)+ {+ HandleException(context.Response, ex, 404);- throw;- }- catch (DirectoryNotFoundException ex)- {- HandleException(context.Response, ex, 404);+ throw;+ }+ catch (FileNotFoundException ex)+ {+ HandleException(context.Response, ex, 404);- throw;- }- catch (UnauthorizedAccessException ex)- {- HandleException(context.Response, ex, 401);+ throw;+ }+ catch (DirectoryNotFoundException ex)+ {+ HandleException(context.Response, ex, 404);- throw;- }- catch (ArgumentException ex)- {- HandleException(context.Response, ex, 400);+ throw;+ }+ catch (UnauthorizedAccessException ex)+ {+ HandleException(context.Response, ex, 401);- throw;- }- catch (Exception ex)- {- HandleException(context.Response, ex, 500);+ throw;+ }+ catch (ArgumentException ex)+ {+ HandleException(context.Response, ex, 400);- throw;- }+ throw;+ }+ catch (Exception ex)+ {+ HandleException(context.Response, ex, 500);- });+ throw;+ }}/// <summary>diff --git a/MediaBrowser.Controller/Kernel.cs b/MediaBrowser.Controller/Kernel.csindex aca7c4bd22..803c4774e3 100644--- a/MediaBrowser.Controller/Kernel.cs+++ b/MediaBrowser.Controller/Kernel.cs@@ -412,18 +412,6 @@ namespace MediaBrowser.Controllerawait Task.WhenAll(itemRepoTask, userRepoTask, userDataRepoTask, displayPreferencesRepoTask).ConfigureAwait(false);}- protected override IEnumerable<Assembly> GetComposablePartAssemblies()- {- var runningDirectory = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);-- return base.GetComposablePartAssemblies().Concat(new[] {-- Assembly.Load(File.ReadAllBytes(Path.Combine(runningDirectory, "MediaBrowser.Api.dll"))),- Assembly.Load(File.ReadAllBytes(Path.Combine(runningDirectory, "MediaBrowser.ApiInteraction.Javascript.dll"))),- Assembly.Load(File.ReadAllBytes(Path.Combine(runningDirectory, "MediaBrowser.WebDashboard.dll")))- });- }-/// <summary>/// Gets a repository by name from a list, and returns the default if not found/// </summary>diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csprojindex f318600baf..f7799557ea 100644--- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj+++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj@@ -314,13 +314,13 @@</BootstrapperPackage></ItemGroup><ItemGroup>- <Content Include="MediaBrowser.Api.dll">+ <Content Include="CorePlugins\MediaBrowser.Api.dll"><CopyToOutputDirectory>Always</CopyToOutputDirectory></Content>- <Content Include="MediaBrowser.ApiInteraction.Javascript.dll">+ <Content Include="CorePlugins\MediaBrowser.ApiInteraction.Javascript.dll"><CopyToOutputDirectory>Always</CopyToOutputDirectory></Content>- <Content Include="MediaBrowser.WebDashboard.dll">+ <Content Include="CorePlugins\MediaBrowser.WebDashboard.dll"><CopyToOutputDirectory>Always</CopyToOutputDirectory></Content><Content Include="x64\SQLite.Interop.dll">diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csprojindex 4e2ee0c669..9a1c89c668 100644--- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj+++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj@@ -400,7 +400,7 @@</ItemGroup><Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /><PropertyGroup>- <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\" /y</PostBuildEvent>+ <PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\CorePlugins\" /y</PostBuildEvent></PropertyGroup><Import Project="$(SolutionDir)\.nuget\nuget.targets" /><!-- To modify your build process, add your task inside one of the targets below and uncomment it.