aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/IO/FileRefresher.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-05-12 14:19:33 -0400
committerGitHub <noreply@github.com>2017-05-12 14:19:33 -0400
commit1a6ee3d48aec8aa592ea2b0aab9560292ce717d6 (patch)
tree558b953b1e01a16bd47d902c841cc747a50e0ae7 /Emby.Server.Implementations/IO/FileRefresher.cs
parent65db32b1f878cd478e9f4b2b4c988890a7ca47c9 (diff)
parent3cdb75190d457cbb3bed91bf79bfb4816cad29e2 (diff)
Merge pull request #2633 from MediaBrowser/beta
Beta
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);