The Free Software Media System - Server Backend & API
update FindByPath
Luke Pulverenti6b1f786a445a
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.csindex f0ee364b43..721603efec 100644--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs@@ -795,12 +795,18 @@ namespace MediaBrowser.Server.Implementations.LibraryPath = path};+ // Only use the database result if there's exactly one item, otherwise we run the risk of returning old data that hasn't been cleaned yet.var items = GetItemIds(query).Select(GetItemById).Where(i => i != null).ToArray();if (items.Length == 1){return items[0];}++ if (items.Length == 0)+ {+ return null;+ }return RootFolder.FindByPath(path);}