aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-12-08 15:19:52 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-12-08 15:19:52 -0500
commitbaf6c3efc7c0e69fce776072ce282c23a69bc1d3 (patch)
tree7fc176b98dc2955ec5ece88ddba981cdeea5f905
parentf856e166ff1a4d95dc7f8f0656751557c2cd7949 (diff)
update FindByPath to not check PhysicalLocations for remote items
-rw-r--r--MediaBrowser.Controller/Entities/Folder.cs17
1 files changed, 14 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index e7593b075..1d38b3728 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -1359,13 +1359,24 @@ namespace MediaBrowser.Controller.Entities
Logger.ErrorException("Error getting ResolveArgs for {0}", ex, Path);
}
- //this should be functionally equivilent to what was here since it is IEnum and works on a thread-safe copy
return RecursiveChildren.Where(i => i.LocationType != LocationType.Virtual).FirstOrDefault(i =>
{
try
{
- return string.Equals(i.Path, path, StringComparison.OrdinalIgnoreCase)
- || i.ResolveArgs.PhysicalLocations.Contains(path, StringComparer.OrdinalIgnoreCase);
+ if (string.Equals(i.Path, path, StringComparison.OrdinalIgnoreCase))
+ {
+ return true;
+ }
+
+ if (i.LocationType != LocationType.Remote)
+ {
+ if (i.ResolveArgs.PhysicalLocations.Contains(path, StringComparer.OrdinalIgnoreCase))
+ {
+ return true;
+ }
+ }
+
+ return false;
}
catch (IOException ex)
{