mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 06:18:28 +01:00
restore changes
This commit is contained in:
@@ -157,7 +157,7 @@ namespace MediaBrowser.Server.Implementations.Devices
|
||||
|
||||
_libraryMonitor.ReportFileSystemChangeBeginning(path);
|
||||
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(path));
|
||||
_fileSystem.CreateDirectory(Path.GetDirectoryName(path));
|
||||
|
||||
try
|
||||
{
|
||||
@@ -290,4 +290,4 @@ namespace MediaBrowser.Server.Implementations.Devices
|
||||
return config.GetConfiguration<DevicesOptions>("devices");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.IO;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.Library
|
||||
{
|
||||
@@ -24,17 +25,19 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly ILibraryManager _libraryManager;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
private readonly IFileSystem _fileSystem;
|
||||
|
||||
private IMediaSourceProvider[] _providers;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
public MediaSourceManager(IItemRepository itemRepo, IUserManager userManager, ILibraryManager libraryManager, ILogger logger, IJsonSerializer jsonSerializer)
|
||||
public MediaSourceManager(IItemRepository itemRepo, IUserManager userManager, ILibraryManager libraryManager, ILogger logger, IJsonSerializer jsonSerializer, IFileSystem fileSystem)
|
||||
{
|
||||
_itemRepo = itemRepo;
|
||||
_userManager = userManager;
|
||||
_libraryManager = libraryManager;
|
||||
_logger = logger;
|
||||
_jsonSerializer = jsonSerializer;
|
||||
_fileSystem = fileSystem;
|
||||
}
|
||||
|
||||
public void AddParts(IEnumerable<IMediaSourceProvider> providers)
|
||||
@@ -170,7 +173,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
if (source.Protocol == MediaProtocol.File)
|
||||
{
|
||||
// TODO: Path substitution
|
||||
if (!File.Exists(source.Path))
|
||||
if (!_fileSystem.FileExists(source.Path))
|
||||
{
|
||||
source.SupportsDirectStream = false;
|
||||
}
|
||||
@@ -582,4 +585,4 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
public MediaSourceInfo MediaSource;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user