浏览代码

Sort special features same as other spots, removing unnecssary function

Added to contributors
Zach Phelan 2 年之前
父节点
当前提交
c71d6f2358
共有 3 个文件被更改,包括 3 次插入14 次删除
  1. 1 0
      CONTRIBUTORS.md
  2. 2 1
      Jellyfin.Api/Controllers/UserLibraryController.cs
  3. 0 13
      MediaBrowser.Controller/Entities/BaseItem.cs

+ 1 - 0
CONTRIBUTORS.md

@@ -148,6 +148,7 @@
  - [xosdy](https://github.com/xosdy)
  - [xosdy](https://github.com/xosdy)
  - [XVicarious](https://github.com/XVicarious)
  - [XVicarious](https://github.com/XVicarious)
  - [YouKnowBlom](https://github.com/YouKnowBlom)
  - [YouKnowBlom](https://github.com/YouKnowBlom)
+ - [ZachPhelan](https://github.com/ZachPhelan)
  - [KristupasSavickas](https://github.com/KristupasSavickas)
  - [KristupasSavickas](https://github.com/KristupasSavickas)
  - [Pusta](https://github.com/pusta)
  - [Pusta](https://github.com/pusta)
  - [nielsvanvelzen](https://github.com/nielsvanvelzen)
  - [nielsvanvelzen](https://github.com/nielsvanvelzen)

+ 2 - 1
Jellyfin.Api/Controllers/UserLibraryController.cs

@@ -233,7 +233,8 @@ namespace Jellyfin.Api.Controllers
             var dtoOptions = new DtoOptions().AddClientFields(Request);
             var dtoOptions = new DtoOptions().AddClientFields(Request);
 
 
             return Ok(item
             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)));
                 .Select(i => _dtoService.GetBaseItemDto(i, dtoOptions, user, item)));
         }
         }
 
 

+ 0 - 13
MediaBrowser.Controller/Entities/BaseItem.cs

@@ -2606,19 +2606,6 @@ 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));
-        }
-
         public virtual long GetRunTimeTicksForPlayState()
         public virtual long GetRunTimeTicksForPlayState()
         {
         {
             return RunTimeTicks ?? 0;
             return RunTimeTicks ?? 0;