jellyfin-server/MediaBrowser.Server.Implementations/Collections/ManualCollectionsFolder.cs

41 lines
932 B
C#
Raw Normal View History

2014-06-23 16:05:19 +00:00
using MediaBrowser.Controller.Entities;
using System.Linq;
namespace MediaBrowser.Server.Implementations.Collections
{
public class ManualCollectionsFolder : BasePluginFolder
{
public ManualCollectionsFolder()
{
Name = "Collections";
}
public override bool IsVisible(User user)
{
if (!GetChildren(user, true).Any())
{
return false;
}
return base.IsVisible(user);
}
public override bool IsHidden
{
get
{
return !ActualChildren.Any() || base.IsHidden;
}
}
2014-06-22 05:52:31 +00:00
public override string CollectionType
{
get { return Model.Entities.CollectionType.BoxSets; }
}
2014-06-23 16:05:19 +00:00
public override string GetClientTypeName()
{
return typeof (CollectionFolder).Name;
}
}
}