aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-08-28 15:56:06 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-08-28 15:56:06 -0400
commitac802322de703be589ba5ce4598c4f223606045d (patch)
tree067d9de88ffd6f83c12b3bc81ed8cfc0eecc6735
parent4a29bb012b6ab976cff994374e02489a72cce4bf (diff)
check location type before starting directory watchers
-rw-r--r--MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs b/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
index ff103b320..560b290fc 100644
--- a/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
+++ b/MediaBrowser.Server.Implementations/IO/DirectoryWatchers.cs
@@ -3,6 +3,7 @@ using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Library;
+using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging;
using MediaBrowser.Server.Implementations.ScheduledTasks;
using System;
@@ -111,7 +112,11 @@ namespace MediaBrowser.Server.Implementations.IO
var pathsToWatch = new List<string> { LibraryManager.RootFolder.Path };
- var paths = LibraryManager.RootFolder.Children.OfType<Folder>()
+ var paths = LibraryManager
+ .RootFolder
+ .Children
+ .OfType<Folder>()
+ .Where(i => i.LocationType != LocationType.Remote && i.LocationType != LocationType.Virtual)
.SelectMany(f =>
{
try
@@ -125,7 +130,10 @@ namespace MediaBrowser.Server.Implementations.IO
}
})
- .Where(Path.IsPathRooted);
+ .Where(Path.IsPathRooted)
+ .Distinct(StringComparer.OrdinalIgnoreCase)
+ .OrderBy(i => i)
+ .ToList();
foreach (var path in paths)
{