From 4e3ce41880d643a2951dc971f1e8f6e21f57829c Mon Sep 17 00:00:00 2001 From: ebr11 Eric Reed spam Date: Thu, 20 Sep 2012 11:25:16 -0400 Subject: Some directory-watcher rework - still not working properly --- MediaBrowser.Controller/Library/ItemController.cs | 91 +---------------------- 1 file changed, 1 insertion(+), 90 deletions(-) (limited to 'MediaBrowser.Controller/Library/ItemController.cs') diff --git a/MediaBrowser.Controller/Library/ItemController.cs b/MediaBrowser.Controller/Library/ItemController.cs index c98e22ba1..54673e538 100644 --- a/MediaBrowser.Controller/Library/ItemController.cs +++ b/MediaBrowser.Controller/Library/ItemController.cs @@ -13,21 +13,6 @@ namespace MediaBrowser.Controller.Library { public class ItemController { - //private BaseItem ResolveItem(ItemResolveEventArgs args) - //{ - // // Try first priority resolvers - // for (int i = 0; i < Kernel.Instance.EntityResolvers.Length; i++) - // { - // var item = Kernel.Instance.EntityResolvers[i].ResolvePath(args); - - // if (item != null) - // { - // return item; - // } - // } - - // return null; - //} /// /// Resolves a path into a BaseItem @@ -56,7 +41,7 @@ namespace MediaBrowser.Controller.Library } - // Fire BeginResolvePath to see if anyone wants to cancel this operation + // Check to see if we should resolve based on our contents if (!EntityResolutionHelper.ShouldResolvePathContents(args)) { return null; @@ -67,80 +52,6 @@ namespace MediaBrowser.Controller.Library return item; } - ///// - ///// Finds child BaseItems for a given Folder - ///// - //private Task[] GetChildren(Folder folder, WIN32_FIND_DATA[] fileSystemChildren, bool allowInternetProviders) - //{ - // Task[] tasks = new Task[fileSystemChildren.Length]; - - // for (int i = 0; i < fileSystemChildren.Length; i++) - // { - // var child = fileSystemChildren[i]; - - // tasks[i] = GetItem(child.Path, folder, child, allowInternetProviders: allowInternetProviders); - // } - - // return tasks; - //} - - ///// - ///// Transforms shortcuts into their actual paths - ///// - //private WIN32_FIND_DATA[] FilterChildFileSystemEntries(WIN32_FIND_DATA[] fileSystemChildren, bool flattenShortcuts) - //{ - // WIN32_FIND_DATA[] returnArray = new WIN32_FIND_DATA[fileSystemChildren.Length]; - // List resolvedShortcuts = new List(); - - // for (int i = 0; i < fileSystemChildren.Length; i++) - // { - // WIN32_FIND_DATA file = fileSystemChildren[i]; - - // // If it's a shortcut, resolve it - // if (Shortcut.IsShortcut(file.Path)) - // { - // string newPath = Shortcut.ResolveShortcut(file.Path); - // WIN32_FIND_DATA newPathData = FileData.GetFileData(newPath); - - // // Find out if the shortcut is pointing to a directory or file - // if (newPathData.IsDirectory) - // { - // // If we're flattening then get the shortcut's children - - // if (flattenShortcuts) - // { - // returnArray[i] = file; - // WIN32_FIND_DATA[] newChildren = FileData.GetFileSystemEntries(newPath, "*").ToArray(); - - // resolvedShortcuts.AddRange(FilterChildFileSystemEntries(newChildren, false)); - // } - // else - // { - // returnArray[i] = newPathData; - // } - // } - // else - // { - // returnArray[i] = newPathData; - // } - // } - // else - // { - // returnArray[i] = file; - // } - // } - - // if (resolvedShortcuts.Count > 0) - // { - // resolvedShortcuts.InsertRange(0, returnArray); - // return resolvedShortcuts.ToArray(); - // } - // else - // { - // return returnArray; - // } - //} - /// /// Gets a Person /// -- cgit v1.2.3