mirror of
https://github.com/jellyfin/jellyfin
synced 2024-09-06 08:04:44 +00:00
fix notifications query
This commit is contained in:
parent
916bda6f32
commit
93a05271c2
|
@ -275,8 +275,6 @@ namespace MediaBrowser.Api.Reports
|
|||
case ItemFilter.IsPlayed:
|
||||
query.IsPlayed = true;
|
||||
break;
|
||||
case ItemFilter.IsRecentlyAdded:
|
||||
break;
|
||||
case ItemFilter.IsResumable:
|
||||
query.IsResumable = true;
|
||||
break;
|
||||
|
|
|
@ -164,8 +164,6 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
case ItemFilter.IsPlayed:
|
||||
query.IsPlayed = true;
|
||||
break;
|
||||
case ItemFilter.IsRecentlyAdded:
|
||||
break;
|
||||
case ItemFilter.IsResumable:
|
||||
query.IsResumable = true;
|
||||
break;
|
||||
|
|
|
@ -149,24 +149,6 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
item = user == null ? _libraryManager.RootFolder : user.RootFolder;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(request.Ids))
|
||||
{
|
||||
var query = GetItemsQuery(request, user);
|
||||
var specificItems = _libraryManager.GetItemList(query).ToArray();
|
||||
if (query.SortBy.Length == 0)
|
||||
{
|
||||
var ids = query.ItemIds.ToList();
|
||||
|
||||
// Try to preserve order
|
||||
specificItems = specificItems.OrderBy(i => ids.IndexOf(i.Id.ToString("N"))).ToArray();
|
||||
}
|
||||
return new QueryResult<BaseItem>
|
||||
{
|
||||
Items = specificItems.ToArray(),
|
||||
TotalRecordCount = specificItems.Length
|
||||
};
|
||||
}
|
||||
|
||||
// Default list type = children
|
||||
|
||||
var folder = item as Folder;
|
||||
|
@ -289,8 +271,6 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
case ItemFilter.IsPlayed:
|
||||
query.IsPlayed = true;
|
||||
break;
|
||||
case ItemFilter.IsRecentlyAdded:
|
||||
break;
|
||||
case ItemFilter.IsResumable:
|
||||
query.IsResumable = true;
|
||||
break;
|
||||
|
|
|
@ -891,16 +891,16 @@ namespace MediaBrowser.Controller.Entities
|
|||
{
|
||||
if (query.ItemIds.Length > 0)
|
||||
{
|
||||
var specificItems = query.ItemIds.Select(LibraryManager.GetItemById).Where(i => i != null).ToList();
|
||||
var result = LibraryManager.GetItemsResult(query);
|
||||
|
||||
if (query.SortBy.Length == 0)
|
||||
{
|
||||
var ids = query.ItemIds.ToList();
|
||||
|
||||
// Try to preserve order
|
||||
specificItems = specificItems.OrderBy(i => ids.IndexOf(i.Id.ToString("N"))).ToList();
|
||||
result.Items = result.Items.OrderBy(i => ids.IndexOf(i.Id.ToString("N"))).ToArray();
|
||||
}
|
||||
return Task.FromResult(PostFilterAndSort(specificItems, query, true, true));
|
||||
return Task.FromResult(result);
|
||||
}
|
||||
|
||||
return GetItemsInternal(query);
|
||||
|
|
|
@ -27,10 +27,6 @@ namespace MediaBrowser.Model.Querying
|
|||
/// </summary>
|
||||
IsFavorite = 5,
|
||||
/// <summary>
|
||||
/// The is recently added
|
||||
/// </summary>
|
||||
IsRecentlyAdded = 6,
|
||||
/// <summary>
|
||||
/// The item is resumable
|
||||
/// </summary>
|
||||
IsResumable = 7,
|
||||
|
|
|
@ -203,12 +203,6 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
|
|||
/// <returns>Video.</returns>
|
||||
protected override Video Resolve(ItemResolveArgs args)
|
||||
{
|
||||
if (args.Path != null && args.Path.IndexOf("disney", StringComparison.OrdinalIgnoreCase) != -1)
|
||||
{
|
||||
var b = true;
|
||||
var a = b;
|
||||
}
|
||||
|
||||
var collectionType = args.GetCollectionType();
|
||||
|
||||
if (IsInvalid(args.Parent, collectionType))
|
||||
|
|
Loading…
Reference in a new issue