mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
update views
This commit is contained in:
parent
3ed1ac10cb
commit
960d45587d
@ -69,7 +69,6 @@ namespace MediaBrowser.Api
|
||||
_config.Configuration.MergeMetadataAndImagesByName = true;
|
||||
_config.Configuration.EnableStandaloneMetadata = true;
|
||||
_config.Configuration.EnableLibraryMetadataSubFolder = true;
|
||||
_config.Configuration.EnableUserSpecificUserViews = true;
|
||||
_config.Configuration.EnableCustomPathSubFolders = true;
|
||||
_config.Configuration.DisableXmlSavers = true;
|
||||
_config.Configuration.DisableStartupScan = true;
|
||||
|
@ -65,30 +65,23 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
|
||||
var list = new List<Folder>();
|
||||
|
||||
if (_config.Configuration.EnableUserSpecificUserViews)
|
||||
foreach (var folder in standaloneFolders)
|
||||
{
|
||||
foreach (var folder in standaloneFolders)
|
||||
{
|
||||
var collectionFolder = folder as ICollectionFolder;
|
||||
var folderViewType = collectionFolder == null ? null : collectionFolder.CollectionType;
|
||||
var collectionFolder = folder as ICollectionFolder;
|
||||
var folderViewType = collectionFolder == null ? null : collectionFolder.CollectionType;
|
||||
|
||||
if (plainFolderIds.Contains(folder.Id))
|
||||
{
|
||||
list.Add(await GetUserView(folder.Id, folder.Name, folderViewType, false, string.Empty, user, cancellationToken).ConfigureAwait(false));
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(folderViewType))
|
||||
{
|
||||
list.Add(await GetUserView(folder.Id, folder.Name, folderViewType, true, string.Empty, user, cancellationToken).ConfigureAwait(false));
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(folder);
|
||||
}
|
||||
if (plainFolderIds.Contains(folder.Id))
|
||||
{
|
||||
list.Add(await GetUserView(folder.Id, folder.Name, folderViewType, false, string.Empty, user, cancellationToken).ConfigureAwait(false));
|
||||
}
|
||||
else if (!string.IsNullOrWhiteSpace(folderViewType))
|
||||
{
|
||||
list.Add(await GetUserView(folder.Id, folder.Name, folderViewType, true, string.Empty, user, cancellationToken).ConfigureAwait(false));
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(folder);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
list.AddRange(standaloneFolders);
|
||||
}
|
||||
|
||||
var parents = foldersWithViewTypes.Where(i => string.Equals(i.GetViewType(user), CollectionType.TvShows, StringComparison.OrdinalIgnoreCase) || string.IsNullOrWhiteSpace(i.GetViewType(user)))
|
||||
@ -120,7 +113,8 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
|
||||
if (parents.Count > 0)
|
||||
{
|
||||
list.Add(await GetUserView(parents, list, CollectionType.Games, string.Empty, user, cancellationToken).ConfigureAwait(false));
|
||||
var name = _localizationManager.GetLocalizedString("ViewType" + CollectionType.Games);
|
||||
list.Add(await _libraryManager.GetNamedView(name, CollectionType.Games, string.Empty, cancellationToken).ConfigureAwait(false));
|
||||
}
|
||||
|
||||
parents = foldersWithViewTypes.Where(i => string.Equals(i.GetViewType(user), CollectionType.BoxSets, StringComparison.OrdinalIgnoreCase))
|
||||
@ -128,7 +122,8 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
|
||||
if (parents.Count > 0)
|
||||
{
|
||||
list.Add(await GetUserView(parents, list, CollectionType.BoxSets, string.Empty, user, cancellationToken).ConfigureAwait(false));
|
||||
var name = _localizationManager.GetLocalizedString("ViewType" + CollectionType.BoxSets);
|
||||
list.Add(await _libraryManager.GetNamedView(name, CollectionType.BoxSets, string.Empty, cancellationToken).ConfigureAwait(false));
|
||||
}
|
||||
|
||||
parents = foldersWithViewTypes.Where(i => string.Equals(i.GetViewType(user), CollectionType.Playlists, StringComparison.OrdinalIgnoreCase))
|
||||
|
Loading…
Reference in New Issue
Block a user