mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 01:24:44 +01:00
add more methods to IFileSystem
This commit is contained in:
@@ -10,6 +10,7 @@ using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using MediaBrowser.Common.IO;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.Connect
|
||||
{
|
||||
@@ -23,8 +24,9 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
|
||||
private readonly INetworkManager _networkManager;
|
||||
private readonly IApplicationHost _appHost;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
public ConnectEntryPoint(IHttpClient httpClient, IApplicationPaths appPaths, ILogger logger, INetworkManager networkManager, IConnectManager connectManager, IApplicationHost appHost)
|
||||
public ConnectEntryPoint(IHttpClient httpClient, IApplicationPaths appPaths, ILogger logger, INetworkManager networkManager, IConnectManager connectManager, IApplicationHost appHost, IFileSystem fileSystem)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
_appPaths = appPaths;
|
||||
@@ -32,6 +34,7 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
_networkManager = networkManager;
|
||||
_connectManager = connectManager;
|
||||
_appHost = appHost;
|
||||
_fileSystem = fileSystem;
|
||||
}
|
||||
|
||||
public void Run()
|
||||
|
||||
@@ -23,6 +23,7 @@ using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.IO;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.Connect
|
||||
{
|
||||
@@ -40,6 +41,7 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IProviderManager _providerManager;
|
||||
private readonly ISecurityManager _securityManager;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
private ConnectData _data = new ConnectData();
|
||||
|
||||
@@ -104,7 +106,7 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
IEncryptionManager encryption,
|
||||
IHttpClient httpClient,
|
||||
IServerApplicationHost appHost,
|
||||
IServerConfigurationManager config, IUserManager userManager, IProviderManager providerManager, ISecurityManager securityManager)
|
||||
IServerConfigurationManager config, IUserManager userManager, IProviderManager providerManager, ISecurityManager securityManager, IFileSystem fileSystem)
|
||||
{
|
||||
_logger = logger;
|
||||
_appPaths = appPaths;
|
||||
@@ -116,6 +118,7 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
_userManager = userManager;
|
||||
_providerManager = providerManager;
|
||||
_securityManager = securityManager;
|
||||
_fileSystem = fileSystem;
|
||||
|
||||
_userManager.UserConfigurationUpdated += _userManager_UserConfigurationUpdated;
|
||||
_config.ConfigurationUpdated += _config_ConfigurationUpdated;
|
||||
@@ -943,7 +946,7 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
{
|
||||
await _providerManager.SaveImage(user, imageUrl, _connectImageSemaphore, ImageType.Primary, null, CancellationToken.None).ConfigureAwait(false);
|
||||
|
||||
await user.RefreshMetadata(new MetadataRefreshOptions
|
||||
await user.RefreshMetadata(new MetadataRefreshOptions(_fileSystem)
|
||||
{
|
||||
ForceSave = true,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user