2014-06-23 09:05:19 -07:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
|
|
|
|
using System.Linq;
|
2014-05-08 13:26:20 -07:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Server.Implementations.Collections
|
|
|
|
|
{
|
|
|
|
|
public class ManualCollectionsFolder : BasePluginFolder
|
|
|
|
|
{
|
|
|
|
|
public ManualCollectionsFolder()
|
|
|
|
|
{
|
|
|
|
|
Name = "Collections";
|
2014-08-02 19:16:37 -07:00
|
|
|
|
DisplayMediaType = "CollectionFolder";
|
2014-05-08 13:26:20 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool IsVisible(User user)
|
|
|
|
|
{
|
2014-07-01 21:57:18 -07:00
|
|
|
|
return GetChildren(user, true).Any() &&
|
|
|
|
|
base.IsVisible(user);
|
2014-05-08 13:26:20 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool IsHidden
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2014-06-30 21:26:50 -07:00
|
|
|
|
return true;
|
2014-05-08 13:26:20 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
2014-06-21 22:52:31 -07:00
|
|
|
|
|
2014-06-30 21:06:28 -07:00
|
|
|
|
public override bool IsHiddenFromUser(User user)
|
|
|
|
|
{
|
2014-07-13 14:03:57 -07:00
|
|
|
|
return !user.Configuration.DisplayCollectionsView;
|
2014-06-30 21:06:28 -07:00
|
|
|
|
}
|
|
|
|
|
|
2014-06-21 22:52:31 -07:00
|
|
|
|
public override string CollectionType
|
|
|
|
|
{
|
|
|
|
|
get { return Model.Entities.CollectionType.BoxSets; }
|
|
|
|
|
}
|
2014-06-23 09:05:19 -07:00
|
|
|
|
|
|
|
|
|
public override string GetClientTypeName()
|
|
|
|
|
{
|
|
|
|
|
return typeof (CollectionFolder).Name;
|
|
|
|
|
}
|
2014-05-08 13:26:20 -07:00
|
|
|
|
}
|
|
|
|
|
}
|