aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Startup.Common
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-11-14 01:27:10 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-11-14 01:27:10 -0500
commit1b06e05cf69815e523faaf9e237461fe0541c7ce (patch)
tree359fe31cb03d01cb51a65f6ebd871a6da58ad988 /MediaBrowser.Server.Startup.Common
parent4f5c7687042148507d5cedfcec81ab355f478f19 (diff)
update translations
Diffstat (limited to 'MediaBrowser.Server.Startup.Common')
-rw-r--r--MediaBrowser.Server.Startup.Common/ApplicationHost.cs14
-rw-r--r--MediaBrowser.Server.Startup.Common/INativeApp.cs3
-rw-r--r--MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj3
-rw-r--r--MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs32
4 files changed, 50 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
index d8358909e9..c4a3562ea7 100644
--- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
+++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
@@ -253,6 +253,19 @@ namespace MediaBrowser.Server.Startup.Common
NativeApp = nativeApp;
}
+ private Version _version;
+ /// <summary>
+ /// Gets the current application version
+ /// </summary>
+ /// <value>The application version.</value>
+ public override Version ApplicationVersion
+ {
+ get
+ {
+ return _version ?? (_version = NativeApp.GetType().Assembly.GetName().Version);
+ }
+ }
+
public override bool IsRunningAsService
{
get { return NativeApp.IsRunningAsService; }
@@ -327,6 +340,7 @@ namespace MediaBrowser.Server.Startup.Common
new PlaylistImages(ServerConfigurationManager).Run();
new RenameXbmcOptions(ServerConfigurationManager).Run();
new RenameXmlOptions(ServerConfigurationManager).Run();
+ new DeprecatePlugins(ApplicationPaths).Run();
}
/// <summary>
diff --git a/MediaBrowser.Server.Startup.Common/INativeApp.cs b/MediaBrowser.Server.Startup.Common/INativeApp.cs
index 5042e1cea3..c41c666657 100644
--- a/MediaBrowser.Server.Startup.Common/INativeApp.cs
+++ b/MediaBrowser.Server.Startup.Common/INativeApp.cs
@@ -1,4 +1,5 @@
-using MediaBrowser.Common.Net;
+using System;
+using MediaBrowser.Common.Net;
using MediaBrowser.Model.Logging;
using System.Collections.Generic;
using System.Reflection;
diff --git a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj
index da0e896e65..4667fe194e 100644
--- a/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj
+++ b/MediaBrowser.Server.Startup.Common/MediaBrowser.Server.Startup.Common.csproj
@@ -24,7 +24,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
+ <DebugType>None</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
@@ -60,6 +60,7 @@
<Compile Include="FFMpeg\FFMpegDownloadInfo.cs" />
<Compile Include="FFMpeg\FFMpegInfo.cs" />
<Compile Include="INativeApp.cs" />
+ <Compile Include="Migrations\DeprecatePlugins.cs" />
<Compile Include="Migrations\IVersionMigration.cs" />
<Compile Include="Migrations\MigrateUserFolders.cs" />
<Compile Include="Migrations\PlaylistImages.cs" />
diff --git a/MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs b/MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs
new file mode 100644
index 0000000000..ce4665b26c
--- /dev/null
+++ b/MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs
@@ -0,0 +1,32 @@
+using MediaBrowser.Controller;
+using System.IO;
+
+namespace MediaBrowser.Server.Startup.Common.Migrations
+{
+ public class DeprecatePlugins : IVersionMigration
+ {
+ private readonly IServerApplicationPaths _appPaths;
+
+ public DeprecatePlugins(IServerApplicationPaths appPaths)
+ {
+ _appPaths = appPaths;
+ }
+
+ public void Run()
+ {
+ RemovePlugin("MediaBrowser.Plugins.LocalTrailers.dll");
+ }
+
+ private void RemovePlugin(string filename)
+ {
+ try
+ {
+ File.Delete(Path.Combine(_appPaths.PluginsPath, filename));
+ }
+ catch
+ {
+
+ }
+ }
+ }
+}