mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
36 lines
898 B
C#
36 lines
898 B
C#
using MediaBrowser.Common.IO;
|
|
using MediaBrowser.Controller;
|
|
using System.IO;
|
|
using CommonIO;
|
|
|
|
namespace MediaBrowser.Server.Startup.Common.Migrations
|
|
{
|
|
public class DeprecatePlugins : IVersionMigration
|
|
{
|
|
private readonly IServerApplicationPaths _appPaths;
|
|
private readonly IFileSystem _fileSystem;
|
|
|
|
public DeprecatePlugins(IServerApplicationPaths appPaths, IFileSystem fileSystem)
|
|
{
|
|
_appPaths = appPaths;
|
|
_fileSystem = fileSystem;
|
|
}
|
|
|
|
public void Run()
|
|
{
|
|
RemovePlugin("MediaBrowser.Plugins.LocalTrailers.dll");
|
|
}
|
|
|
|
private void RemovePlugin(string filename)
|
|
{
|
|
try
|
|
{
|
|
_fileSystem.DeleteFile(Path.Combine(_appPaths.PluginsPath, filename));
|
|
}
|
|
catch
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|