Переглянути джерело

Merge pull request #8401 from ZachPhelan/sort-special-features

Bond-009 2 роки тому
батько
коміт
0b47b03423

+ 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)));
         }
         }
 
 

+ 2 - 1
MediaBrowser.Controller/Entities/BaseItem.cs

@@ -2616,7 +2616,8 @@ namespace MediaBrowser.Controller.Entities
             return ExtraIds
             return ExtraIds
                 .Select(LibraryManager.GetItemById)
                 .Select(LibraryManager.GetItemById)
                 .Where(i => i != null)
                 .Where(i => i != null)
-                .Where(i => i.ExtraType.HasValue && extraTypes.Contains(i.ExtraType.Value));
+                .Where(i => i.ExtraType.HasValue && extraTypes.Contains(i.ExtraType.Value))
+                .OrderBy(i => i.SortName);
         }
         }
 
 
         public virtual long GetRunTimeTicksForPlayState()
         public virtual long GetRunTimeTicksForPlayState()