From 18ff8aba74593f4ad47aba5f001c812b2c9393fe Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 14 Feb 2015 22:36:07 -0500 Subject: fix language settings inheritance --- .../Library/LibraryManager.cs | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs') diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index aac4c87f5..e6e6b8c74 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -401,7 +401,7 @@ namespace MediaBrowser.Server.Implementations.Library } catch (DirectoryNotFoundException) { - + } catch (Exception ex) { @@ -1489,6 +1489,23 @@ namespace MediaBrowser.Server.Implementations.Library return ItemRepository.RetrieveItem(id); } + public IEnumerable GetCollectionFolders(BaseItem item) + { + while (!(item.Parent is AggregateFolder) && item.Parent != null) + { + item = item.Parent; + } + + if (item == null) + { + return new List(); + } + + return GetUserRootFolder().Children + .OfType() + .Where(i => string.Equals(i.Path, item.Path, StringComparison.OrdinalIgnoreCase) || i.PhysicalLocations.Contains(item.Path)); + } + public string GetContentType(BaseItem item) { string configuredContentType = GetConfiguredContentType(item, false); @@ -1547,7 +1564,7 @@ namespace MediaBrowser.Server.Implementations.Library } return null; } - + private string GetTopFolderContentType(BaseItem item) { while (!(item.Parent is AggregateFolder) && item.Parent != null) @@ -1840,7 +1857,7 @@ namespace MediaBrowser.Server.Implementations.Library options.VideoFileExtensions.Remove(".rar"); options.VideoFileExtensions.Remove(".zip"); } - + return options; } -- cgit v1.2.3