jellyfin-server/MediaBrowser.Controller/Entities/ICollectionFolder.cs

37 lines
944 B
C#
Raw Normal View History

2015-04-15 21:59:20 +00:00
using System;
using System.Collections.Generic;
2015-07-29 20:31:15 +00:00
using System.Linq;
2014-10-12 01:46:02 +00:00
2013-02-21 01:33:05 +00:00
namespace MediaBrowser.Controller.Entities
{
/// <summary>
/// This is just a marker interface to denote top level folders
/// </summary>
public interface ICollectionFolder
{
2014-06-14 23:13:09 +00:00
string CollectionType { get; }
2014-10-12 01:46:02 +00:00
string Path { get; }
2015-04-15 21:59:20 +00:00
string Name { get; }
Guid Id { get; }
2014-10-12 01:46:02 +00:00
IEnumerable<string> PhysicalLocations { get; }
2013-02-21 01:33:05 +00:00
}
2015-07-29 20:31:15 +00:00
2015-11-14 16:58:01 +00:00
public interface ISupportsUserSpecificView
{
bool EnableUserSpecificView { get; }
}
2015-07-29 20:31:15 +00:00
public static class CollectionFolderExtensions
{
public static string GetViewType(this ICollectionFolder folder, User user)
{
if (user.Configuration.PlainFolderViews.Contains(folder.Id.ToString("N"), StringComparer.OrdinalIgnoreCase))
{
return null;
}
return folder.CollectionType;
}
}
2013-02-21 01:33:05 +00:00
}