diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-14 00:50:23 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2015-03-14 00:50:23 -0400 |
| commit | dbb7fd61ff0545f8ebf7b9ece432f1408d43040c (patch) | |
| tree | 68d1c42e2bcd4a4be0398c8f4c0f1ba88d42e56e /MediaBrowser.Server.Implementations/Library/UserViewManager.cs | |
| parent | 7c99b0a14a276fbf604c5ce2ce4e392222523f43 (diff) | |
add dynamic images
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/UserViewManager.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/UserViewManager.cs | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs index 8b7cfa9f2..a583534ee 100644 --- a/MediaBrowser.Server.Implementations/Library/UserViewManager.cs +++ b/MediaBrowser.Server.Implementations/Library/UserViewManager.cs @@ -70,40 +70,41 @@ namespace MediaBrowser.Server.Implementations.Library if (foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.TvShows, StringComparison.OrdinalIgnoreCase)) || foldersWithViewTypes.Any(i => string.IsNullOrWhiteSpace(i.CollectionType))) { - list.Add(await GetUserView(CollectionType.TvShows, string.Empty, cancellationToken).ConfigureAwait(false)); + list.Add(await GetUserView(CollectionType.TvShows, string.Empty, user, cancellationToken).ConfigureAwait(false)); } if (foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase)) || foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.MusicVideos, StringComparison.OrdinalIgnoreCase))) { - list.Add(await GetUserView(CollectionType.Music, string.Empty, cancellationToken).ConfigureAwait(false)); + list.Add(await GetUserView(CollectionType.Music, string.Empty, user, cancellationToken).ConfigureAwait(false)); } if (foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.Movies, StringComparison.OrdinalIgnoreCase)) || foldersWithViewTypes.Any(i => string.IsNullOrWhiteSpace(i.CollectionType))) { - list.Add(await GetUserView(CollectionType.Movies, string.Empty, cancellationToken).ConfigureAwait(false)); + list.Add(await GetUserView(CollectionType.Movies, string.Empty, user, cancellationToken).ConfigureAwait(false)); } if (foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.Games, StringComparison.OrdinalIgnoreCase))) { - list.Add(await GetUserView(CollectionType.Games, string.Empty, cancellationToken).ConfigureAwait(false)); + list.Add(await GetUserView(CollectionType.Games, string.Empty, user, cancellationToken).ConfigureAwait(false)); } if (foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.BoxSets, StringComparison.OrdinalIgnoreCase))) { //list.Add(_collectionManager.GetCollectionsFolder(user.Id.ToString("N"))); - list.Add(await GetUserView(CollectionType.BoxSets, string.Empty, cancellationToken).ConfigureAwait(false)); + list.Add(await GetUserView(CollectionType.BoxSets, string.Empty, user, cancellationToken).ConfigureAwait(false)); } if (foldersWithViewTypes.Any(i => string.Equals(i.CollectionType, CollectionType.Playlists, StringComparison.OrdinalIgnoreCase))) { - list.Add(_playlists.GetPlaylistsFolder(user.Id.ToString("N"))); + //list.Add(_playlists.GetPlaylistsFolder(user.Id.ToString("N"))); + list.Add(await GetUserView(CollectionType.Playlists, string.Empty, user, cancellationToken).ConfigureAwait(false)); } if (user.Configuration.DisplayFoldersView) { - list.Add(await GetUserView(CollectionType.Folders, "zz_" + CollectionType.Folders, cancellationToken).ConfigureAwait(false)); + list.Add(await GetUserView(CollectionType.Folders, "zz_" + CollectionType.Folders, user, cancellationToken).ConfigureAwait(false)); } if (query.IncludeExternalContent) @@ -148,23 +149,23 @@ namespace MediaBrowser.Server.Implementations.Library .ThenBy(i => i.SortName); } - public Task<UserView> GetUserView(string name, string parentId, string type, User user, string sortName, CancellationToken cancellationToken) + public Task<UserView> GetUserSubView(string name, string parentId, string type, User user, string sortName, CancellationToken cancellationToken) { - return _libraryManager.GetSpecialFolder(user, name, parentId, type, sortName, cancellationToken); + return _libraryManager.GetNamedView(user, name, parentId, type, sortName, cancellationToken); } - public Task<UserView> GetUserView(string parentId, string type, User user, string sortName, CancellationToken cancellationToken) + public Task<UserView> GetUserSubView(string parentId, string type, User user, string sortName, CancellationToken cancellationToken) { var name = _localizationManager.GetLocalizedString("ViewType" + type); - return GetUserView(name, parentId, type, user, sortName, cancellationToken); + return GetUserSubView(name, parentId, type, user, sortName, cancellationToken); } - public Task<UserView> GetUserView(string type, string sortName, CancellationToken cancellationToken) + public Task<UserView> GetUserView(string type, string sortName, User user, CancellationToken cancellationToken) { var name = _localizationManager.GetLocalizedString("ViewType" + type); - return _libraryManager.GetNamedView(name, type, sortName, cancellationToken); + return _libraryManager.GetNamedView(user, name, type, sortName, cancellationToken); } public List<Tuple<BaseItem, List<BaseItem>>> GetLatestItems(LatestItemsQuery request) |
