update image processor

This commit is contained in:
Luke Pulverenti
2017-05-12 01:00:45 -04:00
parent 6c60656dad
commit 6fd86f61cb
3 changed files with 41 additions and 20 deletions

View File

@@ -34,8 +34,9 @@ namespace Emby.Server.Implementations.IO
public event EventHandler<EventArgs> Completed;
private readonly IEnvironmentInfo _environmentInfo;
private readonly ILibraryManager _libraryManager;
public FileRefresher(string path, IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, ITaskManager taskManager, ILogger logger, ITimerFactory timerFactory, IEnvironmentInfo environmentInfo)
public FileRefresher(string path, IFileSystem fileSystem, IServerConfigurationManager configurationManager, ILibraryManager libraryManager, ITaskManager taskManager, ILogger logger, ITimerFactory timerFactory, IEnvironmentInfo environmentInfo, ILibraryManager libraryManager1)
{
logger.Debug("New file refresher created for {0}", path);
Path = path;
@@ -47,6 +48,7 @@ namespace Emby.Server.Implementations.IO
Logger = logger;
_timerFactory = timerFactory;
_environmentInfo = environmentInfo;
_libraryManager = libraryManager1;
AddPath(path);
}
@@ -235,6 +237,12 @@ namespace Emby.Server.Implementations.IO
return false;
}
// Only try to open video files
if (!_libraryManager.IsVideoFile(path))
{
return false;
}
try
{
var data = _fileSystem.GetFileSystemInfo(path);