aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-10 22:51:23 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-10 22:51:23 -0400
commitfab983b6dcf7b282e8c96e3509209fcc568fb922 (patch)
treefbfc497a45b5fe2d533712978f3486d9d42e104d
parent7b9a5ba3cbb634047eeaaf7cbe1c566b23336b21 (diff)
removed some preemptive file filtering
-rw-r--r--MediaBrowser.Controller/IO/FileData.cs20
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs6
-rw-r--r--MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs4
3 files changed, 8 insertions, 22 deletions
diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.cs
index 2a62d98d0..6d1e3e05a 100644
--- a/MediaBrowser.Controller/IO/FileData.cs
+++ b/MediaBrowser.Controller/IO/FileData.cs
@@ -48,22 +48,16 @@ namespace MediaBrowser.Controller.IO
continue;
}
- var data = FileSystem.GetFileSystemInfo(newPath);
+ // Don't check if it exists here because that could return false for network shares.
+ var data = new DirectoryInfo(newPath);
- if (data.Exists)
+ // add to our physical locations
+ if (args != null)
{
- // add to our physical locations
- if (args != null)
- {
- args.AddAdditionalLocation(newPath);
- }
-
- dict[data.FullName] = data;
- }
- else
- {
- logger.Warn("Cannot add unavailble/non-existent location {0}", data.FullName);
+ args.AddAdditionalLocation(newPath);
}
+
+ dict[data.FullName] = data;
}
else if (flattenFolderDepth > 0 && isDirectory)
{
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 472ea963c..ed4e1dcb3 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -460,12 +460,6 @@ namespace MediaBrowser.Server.Implementations.Library
fileInfo = fileInfo ?? FileSystem.GetFileSystemInfo(path);
- if (!fileInfo.Exists)
- {
- _logger.Error("Path in library does not exist or is unavailable: " + path);
- return null;
- }
-
var args = new ItemResolveArgs(ConfigurationManager.ApplicationPaths)
{
Parent = parent,
diff --git a/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs b/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs
index 89891a162..2c67c9796 100644
--- a/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs
+++ b/MediaBrowser.Server.Implementations/Localization/LocalizationManager.cs
@@ -1,5 +1,4 @@
-using MediaBrowser.Common.IO;
-using MediaBrowser.Controller.Configuration;
+using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Localization;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Globalization;
@@ -10,7 +9,6 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
-using System.Threading.Tasks;
namespace MediaBrowser.Server.Implementations.Localization
{