update views

This commit is contained in:
Luke Pulverenti 2015-11-14 12:05:08 -05:00
parent e32dcb38e4
commit 743102b88f
2 changed files with 17 additions and 1 deletions

View File

@ -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<double> progress, System.Threading.CancellationToken cancellationToken, bool recursive, bool refreshChildMetadata, Providers.MetadataRefreshOptions refreshOptions, Providers.IDirectoryService directoryService)
{
return Task.FromResult(true);

View File

@ -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));