mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-23 21:47:14 -04:00
Pass User instead of UserId inside LatestItemsQuery
This commit is contained in:
parent
21f1813d82
commit
c831af2fe2
3 changed files with 4 additions and 5 deletions
|
@ -207,9 +207,7 @@ namespace Emby.Server.Implementations.Library
|
|||
|
||||
public List<Tuple<BaseItem, List<BaseItem>>> GetLatestItems(LatestItemsQuery request, DtoOptions options)
|
||||
{
|
||||
var user = _userManager.GetUserById(request.UserId);
|
||||
|
||||
var libraryItems = GetItemsForLatestItems(user, request, options);
|
||||
var libraryItems = GetItemsForLatestItems(request.User, request, options);
|
||||
|
||||
var list = new List<Tuple<BaseItem, List<BaseItem>>>();
|
||||
|
||||
|
|
|
@ -560,7 +560,7 @@ public class UserLibraryController : BaseJellyfinApiController
|
|||
IsPlayed = isPlayed,
|
||||
Limit = limit,
|
||||
ParentId = parentId ?? Guid.Empty,
|
||||
UserId = requestUserId,
|
||||
User = user,
|
||||
},
|
||||
dtoOptions);
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Entities;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
|
@ -18,7 +19,7 @@ namespace MediaBrowser.Model.Querying
|
|||
/// Gets or sets the user to localize search results for.
|
||||
/// </summary>
|
||||
/// <value>The user id.</value>
|
||||
public Guid UserId { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parent id.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue