aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Phelan <ZachCPhelan@gmail.com>2022-09-13 16:40:47 -0600
committerZach Phelan <ZachCPhelan@gmail.com>2022-09-13 16:56:23 -0600
commitc71d6f2358ba8a5b1f80a2bef41b6f438c06d03c (patch)
tree94d022e3f22b8f01c97688d312038e4db561efb9
parent0246ba1fb4c3b01fa1be51a57275de7fd2654c31 (diff)
Sort special features same as other spots, removing unnecssary function
Added to contributors
-rw-r--r--CONTRIBUTORS.md1
-rw-r--r--Jellyfin.Api/Controllers/UserLibraryController.cs3
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs13
3 files changed, 3 insertions, 14 deletions
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 98acd4449..8daaae4d9 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -148,6 +148,7 @@
- [xosdy](https://github.com/xosdy)
- [XVicarious](https://github.com/XVicarious)
- [YouKnowBlom](https://github.com/YouKnowBlom)
+ - [ZachPhelan](https://github.com/ZachPhelan)
- [KristupasSavickas](https://github.com/KristupasSavickas)
- [Pusta](https://github.com/pusta)
- [nielsvanvelzen](https://github.com/nielsvanvelzen)
diff --git a/Jellyfin.Api/Controllers/UserLibraryController.cs b/Jellyfin.Api/Controllers/UserLibraryController.cs
index 1656a1e98..940fa27a7 100644
--- a/Jellyfin.Api/Controllers/UserLibraryController.cs
+++ b/Jellyfin.Api/Controllers/UserLibraryController.cs
@@ -233,7 +233,8 @@ namespace Jellyfin.Api.Controllers
var dtoOptions = new DtoOptions().AddClientFields(Request);
return Ok(item
- .GetExtras(BaseItem.DisplayExtraTypes)
+ .GetExtras()
+ .Where(i => i.ExtraType.HasValue && BaseItem.DisplayExtraTypes.Contains(i.ExtraType.Value))
.Select(i => _dtoService.GetBaseItemDto(i, dtoOptions, user, item)));
}
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 5cee6ce40..988d0a534 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -2606,19 +2606,6 @@ namespace MediaBrowser.Controller.Entities
.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));
- }
-
public virtual long GetRunTimeTicksForPlayState()
{
return RunTimeTicks ?? 0;