From 743102b88f22c04c1cd932f4d93a413093bea1ed Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 14 Nov 2015 12:05:08 -0500 Subject: [PATCH] update views --- MediaBrowser.Controller/Entities/UserView.cs | 12 ++++++++++++ .../Library/UserViewManager.cs | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Controller/Entities/UserView.cs b/MediaBrowser.Controller/Entities/UserView.cs index 2379326a15..df089b5b21 100644 --- a/MediaBrowser.Controller/Entities/UserView.cs +++ b/MediaBrowser.Controller/Entities/UserView.cs @@ -164,6 +164,18 @@ namespace MediaBrowser.Controller.Entities return types.Contains(viewType ?? string.Empty, StringComparer.OrdinalIgnoreCase); } + public static bool EnableOriginalFolder(string viewType) + { + var types = new[] + { + CollectionType.Games, + CollectionType.Books, + CollectionType.MusicVideos + }; + + return types.Contains(viewType ?? string.Empty, StringComparer.OrdinalIgnoreCase); + } + protected override Task ValidateChildrenInternal(IProgress progress, System.Threading.CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, Providers.MetadataRefreshOptions refreshOptions, Providers.IDirectoryService directoryService) { return Task.FromResult(true); diff --git a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs index 98a3759233..7d28be7ff3 100644 --- a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs @@ -90,7 +90,7 @@ namespace MediaBrowser.Server.Implementations.Library { list.Add(await GetUserView(folder, folderViewType, false, string.Empty, cancellationToken).ConfigureAwait(false)); } - else if (_config.Configuration.EnableSharedCollectionViewImage) + else if (_config.Configuration.EnableSharedCollectionViewImage || UserView.EnableOriginalFolder(folderViewType)) { list.Add(folder); } @@ -110,6 +110,10 @@ namespace MediaBrowser.Server.Implementations.Library { list.Add(await GetUserView(folder.Id, folder.Name, folderViewType, false, string.Empty, user, cancellationToken).ConfigureAwait(false)); } + else if (_config.Configuration.EnableSharedCollectionViewImage || UserView.EnableOriginalFolder(folderViewType)) + { + list.Add(folder); + } else if (!string.IsNullOrWhiteSpace(folderViewType)) { list.Add(await GetUserView(folder.Id, folder.Name, folderViewType, true, string.Empty, user, cancellationToken).ConfigureAwait(false));