diff options
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs b/MediaBrowser.Server.Startup.Common/Migrations/DeprecatePlugins.cs new file mode 100644 index 000000000..ce4665b26 --- /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 + { + + } + } + } +} |
