From 81d5e9f8087227591b2be068e822342b17ef3d7a Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 29 Jan 2014 00:17:58 -0500 Subject: persist provider results --- .../IO/LibraryMonitor.cs | 25 +++++++--------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs') diff --git a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs index 22ea668f4..0716a3d83 100644 --- a/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs +++ b/MediaBrowser.Server.Implementations/IO/LibraryMonitor.cs @@ -56,21 +56,6 @@ namespace MediaBrowser.Server.Implementations.IO _tempIgnoredPaths[path] = path; } - /// - /// Removes the temp ignore. - /// - /// The path. - private async void RemoveTempIgnore(string path) - { - // This is an arbitraty amount of time, but delay it because file system writes often trigger events after RemoveTempIgnore has been called. - // Seeing long delays in some situations, especially over the network. - // Seeing delays up to 40 seconds, but not going to ignore changes for that long. - await Task.Delay(1500).ConfigureAwait(false); - - string val; - _tempIgnoredPaths.TryRemove(path, out val); - } - public void ReportFileSystemChangeBeginning(string path) { if (string.IsNullOrEmpty(path)) @@ -81,14 +66,20 @@ namespace MediaBrowser.Server.Implementations.IO TemporarilyIgnore(path); } - public void ReportFileSystemChangeComplete(string path, bool refreshPath) + public async void ReportFileSystemChangeComplete(string path, bool refreshPath) { if (string.IsNullOrEmpty(path)) { throw new ArgumentNullException("path"); } - RemoveTempIgnore(path); + // This is an arbitraty amount of time, but delay it because file system writes often trigger events after RemoveTempIgnore has been called. + // Seeing long delays in some situations, especially over the network. + // Seeing delays up to 40 seconds, but not going to ignore changes for that long. + await Task.Delay(1500).ConfigureAwait(false); + + string val; + _tempIgnoredPaths.TryRemove(path, out val); if (refreshPath) { -- cgit v1.2.3