mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
update data queries
This commit is contained in:
@@ -129,7 +129,8 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
PersonIds = request.GetPersonIds(),
|
||||
PersonTypes = request.GetPersonTypes(),
|
||||
Years = request.GetYears(),
|
||||
MinCommunityRating = request.MinCommunityRating
|
||||
MinCommunityRating = request.MinCommunityRating,
|
||||
DtoOptions = dtoOptions
|
||||
};
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(request.ParentId))
|
||||
|
||||
@@ -330,7 +330,7 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
{
|
||||
var requestedLocationTypes =
|
||||
request.LocationTypes.Split(',')
|
||||
.Select(d => (LocationType) Enum.Parse(typeof (LocationType), d, true))
|
||||
.Select(d => (LocationType)Enum.Parse(typeof(LocationType), d, true))
|
||||
.ToList();
|
||||
|
||||
if (requestedLocationTypes.Count > 0 && requestedLocationTypes.Count < 4)
|
||||
@@ -381,15 +381,15 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
// Albums
|
||||
if (!string.IsNullOrEmpty(request.Albums))
|
||||
{
|
||||
query.AlbumIds = request.Albums.Split('|').Select(i =>
|
||||
query.AlbumIds = request.Albums.Split('|').SelectMany(i =>
|
||||
{
|
||||
return _libraryManager.GetItemList(new InternalItemsQuery
|
||||
return _libraryManager.GetItemIds(new InternalItemsQuery
|
||||
{
|
||||
IncludeItemTypes = new[] { typeof(MusicAlbum).Name },
|
||||
Name = i,
|
||||
Limit = 1
|
||||
|
||||
}).Select(album => album.Id.ToString("N")).FirstOrDefault();
|
||||
}).Select(albumId => albumId.ToString("N"));
|
||||
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
@@ -308,6 +308,8 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
}
|
||||
}
|
||||
|
||||
var dtoOptions = GetDtoOptions(_authContext, request);
|
||||
|
||||
var list = _userViewManager.GetLatestItems(new LatestItemsQuery
|
||||
{
|
||||
GroupItems = request.GroupItems,
|
||||
@@ -315,10 +317,8 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
IsPlayed = request.IsPlayed,
|
||||
Limit = request.Limit,
|
||||
ParentId = request.ParentId,
|
||||
UserId = request.UserId
|
||||
});
|
||||
|
||||
var dtoOptions = GetDtoOptions(_authContext, request);
|
||||
UserId = request.UserId,
|
||||
}, dtoOptions);
|
||||
|
||||
var dtos = list.Select(i =>
|
||||
{
|
||||
@@ -360,7 +360,7 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
var currentUser = user;
|
||||
|
||||
var dtos = series
|
||||
.GetEpisodes(user)
|
||||
.GetEpisodes(user, dtoOptions)
|
||||
.Where(i => i.ParentIndexNumber.HasValue && i.ParentIndexNumber.Value == 0)
|
||||
.OrderBy(i =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user