aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/IO/FileRefresher.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-12 01:00:45 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-12 01:00:45 -0400
commit6fd86f61cbd803dbab50907466d34ce087d6edec (patch)
tree9d22b44a2a978b78fdc50b31d8ea2146f52d1ede /Emby.Server.Implementations/IO/FileRefresher.cs
parent6c60656dade3e986b0320c7885f0e43c67ecc9f2 (diff)
update image processor
Diffstat (limited to 'Emby.Server.Implementations/IO/FileRefresher.cs')
-rw-r--r--Emby.Server.Implementations/IO/FileRefresher.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/IO/FileRefresher.cs b/Emby.Server.Implementations/IO/FileRefresher.cs
index 033cbd8b0..edff25156 100644
--- a/Emby.Server.Implementations/IO/FileRefresher.cs
+++ b/Emby.Server.Implementations/IO/FileRefresher.cs
@@ -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);