mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-28 04:55:11 +01:00
make channel access opt-in rather than opt out
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller;
|
||||
using System.IO;
|
||||
|
||||
namespace MediaBrowser.Server.Startup.Common.Migrations
|
||||
@@ -6,10 +7,12 @@ namespace MediaBrowser.Server.Startup.Common.Migrations
|
||||
public class DeleteDlnaProfiles : IVersionMigration
|
||||
{
|
||||
private readonly IServerApplicationPaths _appPaths;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
public DeleteDlnaProfiles(IServerApplicationPaths appPaths)
|
||||
public DeleteDlnaProfiles(IServerApplicationPaths appPaths, IFileSystem fileSystem)
|
||||
{
|
||||
_appPaths = appPaths;
|
||||
_fileSystem = fileSystem;
|
||||
}
|
||||
|
||||
public void Run()
|
||||
@@ -23,7 +26,7 @@ namespace MediaBrowser.Server.Startup.Common.Migrations
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Delete(Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "system", filename + ".xml"));
|
||||
_fileSystem.DeleteFile(Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "system", filename + ".xml"));
|
||||
}
|
||||
catch
|
||||
{
|
||||
@@ -31,7 +34,7 @@ namespace MediaBrowser.Server.Startup.Common.Migrations
|
||||
}
|
||||
try
|
||||
{
|
||||
File.Delete(Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "user", filename + ".xml"));
|
||||
_fileSystem.DeleteFile(Path.Combine(_appPaths.ConfigurationDirectoryPath, "dlna", "user", filename + ".xml"));
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller;
|
||||
using System.IO;
|
||||
|
||||
namespace MediaBrowser.Server.Startup.Common.Migrations
|
||||
@@ -6,10 +7,12 @@ namespace MediaBrowser.Server.Startup.Common.Migrations
|
||||
public class DeprecatePlugins : IVersionMigration
|
||||
{
|
||||
private readonly IServerApplicationPaths _appPaths;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
public DeprecatePlugins(IServerApplicationPaths appPaths)
|
||||
public DeprecatePlugins(IServerApplicationPaths appPaths, IFileSystem fileSystem)
|
||||
{
|
||||
_appPaths = appPaths;
|
||||
_fileSystem = fileSystem;
|
||||
}
|
||||
|
||||
public void Run()
|
||||
@@ -21,7 +24,7 @@ namespace MediaBrowser.Server.Startup.Common.Migrations
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Delete(Path.Combine(_appPaths.PluginsPath, filename));
|
||||
_fileSystem.DeleteFile(Path.Combine(_appPaths.PluginsPath, filename));
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Controller;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@@ -8,10 +9,12 @@ namespace MediaBrowser.Server.Startup.Common.Migrations
|
||||
public class MigrateUserFolders : IVersionMigration
|
||||
{
|
||||
private readonly IServerApplicationPaths _appPaths;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
public MigrateUserFolders(IServerApplicationPaths appPaths)
|
||||
public MigrateUserFolders(IServerApplicationPaths appPaths, IFileSystem fileSystem)
|
||||
{
|
||||
_appPaths = appPaths;
|
||||
_fileSystem = fileSystem;
|
||||
}
|
||||
|
||||
public void Run()
|
||||
@@ -25,7 +28,7 @@ namespace MediaBrowser.Server.Startup.Common.Migrations
|
||||
|
||||
foreach (var folder in folders)
|
||||
{
|
||||
Directory.Delete(folder.FullName, true);
|
||||
_fileSystem.DeleteDirectory(folder.FullName, true);
|
||||
}
|
||||
}
|
||||
catch (IOException)
|
||||
|
||||
Reference in New Issue
Block a user