mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
update item by name validators
This commit is contained in:
@@ -157,24 +157,7 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
folder = user == null ? _libraryManager.RootFolder : _libraryManager.GetUserRootFolder();
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(request.Ids))
|
||||
{
|
||||
request.Recursive = true;
|
||||
var query = GetItemsQuery(request, user);
|
||||
var result = await folder.GetItems(query).ConfigureAwait(false);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(request.SortBy))
|
||||
{
|
||||
var ids = query.ItemIds.ToList();
|
||||
|
||||
// Try to preserve order
|
||||
result.Items = result.Items.OrderBy(i => ids.IndexOf(i.Id.ToString("N"))).ToArray();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
if (request.Recursive)
|
||||
if (request.Recursive || !string.IsNullOrEmpty(request.Ids))
|
||||
{
|
||||
return await folder.GetItems(GetItemsQuery(request, user)).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user