diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-11-14 11:58:01 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-11-14 11:58:01 -0500 |
| commit | e32dcb38e4dea354bcba8875717d396fa6ce1129 (patch) | |
| tree | 96b402c51bf66f0553ac0fdd189f071a0553aac7 /MediaBrowser.Controller | |
| parent | c97a88377f66ea16fe25f61175965f8695655c25 (diff) | |
update timeline view
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/ICollectionFolder.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/UserView.cs | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/ICollectionFolder.cs b/MediaBrowser.Controller/Entities/ICollectionFolder.cs index b55ca0a17..f4544f173 100644 --- a/MediaBrowser.Controller/Entities/ICollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/ICollectionFolder.cs @@ -16,6 +16,11 @@ namespace MediaBrowser.Controller.Entities IEnumerable<string> PhysicalLocations { get; } } + public interface ISupportsUserSpecificView + { + bool EnableUserSpecificView { get; } + } + public static class CollectionFolderExtensions { public static string GetViewType(this ICollectionFolder folder, User user) diff --git a/MediaBrowser.Controller/Entities/UserView.cs b/MediaBrowser.Controller/Entities/UserView.cs index f14ba568b..2379326a1 100644 --- a/MediaBrowser.Controller/Entities/UserView.cs +++ b/MediaBrowser.Controller/Entities/UserView.cs @@ -144,12 +144,22 @@ namespace MediaBrowser.Controller.Entities return false; } + var supportsUserSpecific = folder as ISupportsUserSpecificView; + if (supportsUserSpecific != null && supportsUserSpecific.EnableUserSpecificView) + { + return true; + } + return standaloneTypes.Contains(collectionFolder.CollectionType ?? string.Empty); } public static bool IsEligibleForEnhancedView(string viewType) { - var types = new[] { CollectionType.Movies, CollectionType.TvShows }; + var types = new[] + { + CollectionType.Movies, + CollectionType.TvShows + }; return types.Contains(viewType ?? string.Empty, StringComparer.OrdinalIgnoreCase); } |
