aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-14 22:36:07 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-14 22:36:07 -0500
commit18ff8aba74593f4ad47aba5f001c812b2c9393fe (patch)
tree7cb25d32e92e3c5aee8af4cff4cb25d44ccfa4f6 /MediaBrowser.Server.Implementations/Library/LibraryManager.cs
parent26fec4f990fab24a5aeec7c9ae938ec55856cf54 (diff)
fix language settings inheritance
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs23
1 files changed, 20 insertions, 3 deletions
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<Folder> GetCollectionFolders(BaseItem item)
+ {
+ while (!(item.Parent is AggregateFolder) && item.Parent != null)
+ {
+ item = item.Parent;
+ }
+
+ if (item == null)
+ {
+ return new List<Folder>();
+ }
+
+ return GetUserRootFolder().Children
+ .OfType<Folder>()
+ .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;
}