mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 22:38:30 +01:00
#514 - Support HLS seeking
This commit is contained in:
@@ -856,19 +856,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
public IEnumerable<BaseItem> GetRecursiveChildren(User user, bool includeLinkedChildren = true)
|
||||
{
|
||||
return GetRecursiveChildren(user, null, includeLinkedChildren);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the recursive children.
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="filter">The filter.</param>
|
||||
/// <param name="includeLinkedChildren">if set to <c>true</c> [include linked children].</param>
|
||||
/// <returns>IList{BaseItem}.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
public IList<BaseItem> GetRecursiveChildren(User user, Func<BaseItem, bool> filter, bool includeLinkedChildren = true)
|
||||
{
|
||||
if (user == null)
|
||||
{
|
||||
@@ -877,7 +864,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
var list = new List<BaseItem>();
|
||||
|
||||
var hasLinkedChildren = AddChildrenToList(user, includeLinkedChildren, list, true, filter);
|
||||
var hasLinkedChildren = AddChildrenToList(user, includeLinkedChildren, list, true, null);
|
||||
|
||||
return hasLinkedChildren ? list.DistinctBy(i => i.Id).ToList() : list;
|
||||
}
|
||||
@@ -887,20 +874,10 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <returns>IList{BaseItem}.</returns>
|
||||
public IList<BaseItem> GetRecursiveChildren()
|
||||
{
|
||||
return GetRecursiveChildren(i => true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the recursive children.
|
||||
/// </summary>
|
||||
/// <param name="filter">The filter.</param>
|
||||
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||
public IList<BaseItem> GetRecursiveChildren(Func<BaseItem, bool> filter)
|
||||
{
|
||||
var list = new List<BaseItem>();
|
||||
|
||||
AddChildrenToList(list, true, filter);
|
||||
AddChildrenToList(list, true, null);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -18,11 +18,17 @@ namespace MediaBrowser.Controller.Entities
|
||||
switch (ViewType)
|
||||
{
|
||||
case CollectionType.Games:
|
||||
return mediaFolders.SelectMany(i => i.GetRecursiveChildren(user, includeLinkedChildren)).OfType<GameSystem>();
|
||||
return mediaFolders.SelectMany(i => i.GetRecursiveChildren(user, includeLinkedChildren))
|
||||
.OfType<GameSystem>();
|
||||
case CollectionType.BoxSets:
|
||||
return mediaFolders.SelectMany(i => i.GetRecursiveChildren(user, includeLinkedChildren)).OfType<BoxSet>();
|
||||
return mediaFolders.SelectMany(i => i.GetRecursiveChildren(user, includeLinkedChildren))
|
||||
.OfType<BoxSet>();
|
||||
case CollectionType.TvShows:
|
||||
return mediaFolders.SelectMany(i => i.GetRecursiveChildren(user, includeLinkedChildren)).OfType<Series>();
|
||||
return mediaFolders.SelectMany(i => i.GetRecursiveChildren(user, includeLinkedChildren))
|
||||
.OfType<Series>();
|
||||
case CollectionType.Trailers:
|
||||
return mediaFolders.SelectMany(i => i.GetRecursiveChildren(user, includeLinkedChildren))
|
||||
.OfType<Trailer>();
|
||||
default:
|
||||
return mediaFolders.SelectMany(i => i.GetChildren(user, includeLinkedChildren));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user