mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
add null checks to get theme media
This commit is contained in:
parent
e988588745
commit
671a512699
1 changed files with 2 additions and 0 deletions
|
@ -839,6 +839,7 @@ namespace MediaBrowser.Api.Library
|
||||||
var dtoOptions = GetDtoOptions(request);
|
var dtoOptions = GetDtoOptions(request);
|
||||||
|
|
||||||
var dtos = GetThemeSongIds(item).Select(_libraryManager.GetItemById)
|
var dtos = GetThemeSongIds(item).Select(_libraryManager.GetItemById)
|
||||||
|
.Where(i => i != null)
|
||||||
.OrderBy(i => i.SortName)
|
.OrderBy(i => i.SortName)
|
||||||
.Select(i => _dtoService.GetBaseItemDto(i, dtoOptions, user, item));
|
.Select(i => _dtoService.GetBaseItemDto(i, dtoOptions, user, item));
|
||||||
|
|
||||||
|
@ -882,6 +883,7 @@ namespace MediaBrowser.Api.Library
|
||||||
var dtoOptions = GetDtoOptions(request);
|
var dtoOptions = GetDtoOptions(request);
|
||||||
|
|
||||||
var dtos = GetThemeVideoIds(item).Select(_libraryManager.GetItemById)
|
var dtos = GetThemeVideoIds(item).Select(_libraryManager.GetItemById)
|
||||||
|
.Where(i => i != null)
|
||||||
.OrderBy(i => i.SortName)
|
.OrderBy(i => i.SortName)
|
||||||
.Select(i => _dtoService.GetBaseItemDto(i, dtoOptions, user, item));
|
.Select(i => _dtoService.GetBaseItemDto(i, dtoOptions, user, item));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue