mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 23:58:57 +00:00
Fix nullability errors in Jellyfin.Api (part 1)
This commit is contained in:
@@ -455,7 +455,7 @@ namespace Jellyfin.Api.Controllers
|
||||
: null;
|
||||
|
||||
var dtoOptions = new DtoOptions().AddClientFields(Request);
|
||||
BaseItem parent = item.GetParent();
|
||||
BaseItem? parent = item.GetParent();
|
||||
|
||||
while (parent != null)
|
||||
{
|
||||
@@ -466,7 +466,7 @@ namespace Jellyfin.Api.Controllers
|
||||
|
||||
baseItemDtos.Add(_dtoService.GetBaseItemDto(parent, dtoOptions, user));
|
||||
|
||||
parent = parent.GetParent();
|
||||
parent = parent?.GetParent();
|
||||
}
|
||||
|
||||
return baseItemDtos;
|
||||
@@ -854,7 +854,7 @@ namespace Jellyfin.Api.Controllers
|
||||
return _libraryManager.GetItemsResult(query).TotalRecordCount;
|
||||
}
|
||||
|
||||
private BaseItem TranslateParentItem(BaseItem item, User user)
|
||||
private BaseItem? TranslateParentItem(BaseItem item, User user)
|
||||
{
|
||||
return item.GetParent() is AggregateFolder
|
||||
? _libraryManager.GetUserRootFolder().GetChildren(user, true)
|
||||
|
||||
Reference in New Issue
Block a user