Add function back for compatibility, add sorting
This commit is contained in:
parent
c71d6f2358
commit
8857edb66c
|
@ -2606,6 +2606,20 @@ namespace MediaBrowser.Controller.Entities
|
||||||
.OrderBy(i => i.SortName);
|
.OrderBy(i => i.SortName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get all extras with specific types that are associated with this item.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="extraTypes">The types of extras to retrieve.</param>
|
||||||
|
/// <returns>An enumerable containing the extras.</returns>
|
||||||
|
public IEnumerable<BaseItem> GetExtras(IReadOnlyCollection<ExtraType> extraTypes)
|
||||||
|
{
|
||||||
|
return ExtraIds
|
||||||
|
.Select(LibraryManager.GetItemById)
|
||||||
|
.Where(i => i != null)
|
||||||
|
.Where(i => i.ExtraType.HasValue && extraTypes.Contains(i.ExtraType.Value))
|
||||||
|
.OrderBy(i => i.SortName);
|
||||||
|
}
|
||||||
|
|
||||||
public virtual long GetRunTimeTicksForPlayState()
|
public virtual long GetRunTimeTicksForPlayState()
|
||||||
{
|
{
|
||||||
return RunTimeTicks ?? 0;
|
return RunTimeTicks ?? 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user