fix directory watchers not picking up changes

This commit is contained in:
Luke Pulverenti
2013-11-26 21:38:11 -05:00
parent 9f5fbfa855
commit 64818ebd22
9 changed files with 59 additions and 23 deletions

View File

@@ -286,7 +286,12 @@ namespace MediaBrowser.Api.Library
}
finally
{
_directoryWatchers.Start();
// No need to start if scanning the library because it will handle it
if (!request.RefreshLibrary)
{
_directoryWatchers.Start();
}
_directoryWatchers.RemoveTempIgnore(virtualFolderPath);
}
@@ -353,7 +358,12 @@ namespace MediaBrowser.Api.Library
}
finally
{
_directoryWatchers.Start();
// No need to start if scanning the library because it will handle it
if (!request.RefreshLibrary)
{
_directoryWatchers.Start();
}
_directoryWatchers.RemoveTempIgnore(currentPath);
_directoryWatchers.RemoveTempIgnore(newPath);
}
@@ -404,7 +414,12 @@ namespace MediaBrowser.Api.Library
}
finally
{
_directoryWatchers.Start();
// No need to start if scanning the library because it will handle it
if (!request.RefreshLibrary)
{
_directoryWatchers.Start();
}
_directoryWatchers.RemoveTempIgnore(path);
}
@@ -442,7 +457,11 @@ namespace MediaBrowser.Api.Library
}
finally
{
_directoryWatchers.Start();
// No need to start if scanning the library because it will handle it
if (!request.RefreshLibrary)
{
_directoryWatchers.Start();
}
}
if (request.RefreshLibrary)
@@ -479,7 +498,11 @@ namespace MediaBrowser.Api.Library
}
finally
{
_directoryWatchers.Start();
// No need to start if scanning the library because it will handle it
if (!request.RefreshLibrary)
{
_directoryWatchers.Start();
}
}
if (request.RefreshLibrary)