2014-06-23 12:05:19 -04:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2015-01-24 17:33:26 -05:00
|
|
|
|
using MediaBrowser.Controller.Entities.Movies;
|
2014-06-23 12:05:19 -04:00
|
|
|
|
using System.Linq;
|
2014-05-08 16:26:20 -04:00
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Server.Implementations.Collections
|
|
|
|
|
|
{
|
|
|
|
|
|
public class ManualCollectionsFolder : BasePluginFolder
|
|
|
|
|
|
{
|
|
|
|
|
|
public ManualCollectionsFolder()
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = "Collections";
|
2014-08-02 22:16:37 -04:00
|
|
|
|
DisplayMediaType = "CollectionFolder";
|
2014-05-08 16:26:20 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override bool IsVisible(User user)
|
|
|
|
|
|
{
|
2015-01-23 01:15:15 -05:00
|
|
|
|
return base.IsVisible(user) && GetChildren(user, false)
|
2015-01-24 17:33:26 -05:00
|
|
|
|
.OfType<BoxSet>()
|
|
|
|
|
|
.Any(i => i.IsVisible(user));
|
2014-05-08 16:26:20 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override bool IsHidden
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
2014-07-01 00:26:50 -04:00
|
|
|
|
return true;
|
2014-05-08 16:26:20 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2014-06-22 01:52:31 -04:00
|
|
|
|
|
2014-07-01 00:06:28 -04:00
|
|
|
|
public override bool IsHiddenFromUser(User user)
|
|
|
|
|
|
{
|
2014-07-13 17:03:57 -04:00
|
|
|
|
return !user.Configuration.DisplayCollectionsView;
|
2014-07-01 00:06:28 -04:00
|
|
|
|
}
|
|
|
|
|
|
|
2014-06-22 01:52:31 -04:00
|
|
|
|
public override string CollectionType
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return Model.Entities.CollectionType.BoxSets; }
|
|
|
|
|
|
}
|
2014-06-23 12:05:19 -04:00
|
|
|
|
|
|
|
|
|
|
public override string GetClientTypeName()
|
|
|
|
|
|
{
|
|
|
|
|
|
return typeof (CollectionFolder).Name;
|
|
|
|
|
|
}
|
2014-05-08 16:26:20 -04:00
|
|
|
|
}
|
|
|
|
|
|
}
|