The Free Software Media System - Server Backend & API
update FindByPath to not check PhysicalLocations for remote items
Luke Pulverentibaf6c3efc7c0
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.csindex e7593b075e..1d38b37281 100644--- a/MediaBrowser.Controller/Entities/Folder.cs+++ b/MediaBrowser.Controller/Entities/Folder.cs@@ -1359,13 +1359,24 @@ namespace MediaBrowser.Controller.EntitiesLogger.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 copyreturn 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){