diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-08-27 13:34:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-27 13:34:55 -0400 |
| commit | f3ee129bd9e88e8768221ba176bc8356f9b240e3 (patch) | |
| tree | 72dc082f77629e8d70f764d175433b40ac4c02d0 /MediaBrowser.Api/Library/LibraryService.cs | |
| parent | 4f8684a16b1102056bd2b527dcbd585b78dd8000 (diff) | |
| parent | fa6bec94b59cf850246c5d0757b9279d080643d7 (diff) | |
Merge pull request #2847 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Api/Library/LibraryService.cs')
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryService.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/MediaBrowser.Api/Library/LibraryService.cs b/MediaBrowser.Api/Library/LibraryService.cs index 7dd1afaf4..44cc60b50 100644 --- a/MediaBrowser.Api/Library/LibraryService.cs +++ b/MediaBrowser.Api/Library/LibraryService.cs @@ -227,7 +227,7 @@ namespace MediaBrowser.Api.Library [Route("/Library/MediaFolders", "GET", Summary = "Gets all user media folders.")] [Authenticated] - public class GetMediaFolders : IReturn<ItemsResult> + public class GetMediaFolders : IReturn<QueryResult<BaseItemDto>> { [ApiMember(Name = "IsHidden", Description = "Optional. Filter by folders that are marked hidden, or not.", IsRequired = false, DataType = "boolean", ParameterType = "query", Verb = "GET")] public bool? IsHidden { get; set; } @@ -400,7 +400,7 @@ namespace MediaBrowser.Api.Library }); } - return new ItemsResult(); + return new QueryResult<BaseItemDto>(); } public object Get(GetMediaFolders request) @@ -416,7 +416,7 @@ namespace MediaBrowser.Api.Library var dtoOptions = GetDtoOptions(_authContext, request); - var result = new ItemsResult + var result = new QueryResult<BaseItemDto> { TotalRecordCount = items.Count, @@ -525,18 +525,18 @@ namespace MediaBrowser.Api.Library }); } - private async void LogDownload(BaseItem item, User user, AuthorizationInfo auth) + private void LogDownload(BaseItem item, User user, AuthorizationInfo auth) { try { - await _activityManager.Create(new ActivityLogEntry + _activityManager.Create(new ActivityLogEntry { Name = string.Format(_localization.GetLocalizedString("UserDownloadingItemWithValues"), user.Name, item.Name), Type = "UserDownloadingContent", ShortOverview = string.Format(_localization.GetLocalizedString("AppDeviceValues"), auth.Client, auth.Device), UserId = auth.UserId - }).ConfigureAwait(false); + }); } catch { @@ -615,7 +615,7 @@ namespace MediaBrowser.Api.Library parent = parent.GetParent(); } - return baseItemDtos.ToList(); + return baseItemDtos; } private BaseItem TranslateParentItem(BaseItem item, User user) @@ -915,7 +915,7 @@ namespace MediaBrowser.Api.Library : request.IncludeItemTypes.Split(','); var user = !string.IsNullOrWhiteSpace(request.UserId) ? _userManager.GetUserById(request.UserId) : null; - + var query = new InternalItemsQuery(user) { IncludeItemTypes = includeTypes, |
