Split nested conditional
This commit is contained in:
parent
2055d49701
commit
f48e47be5f
|
@ -71,11 +71,19 @@ namespace Jellyfin.Api.Controllers
|
|||
parentItem = null;
|
||||
}
|
||||
|
||||
var item = parentId.HasValue
|
||||
? parentItem
|
||||
: user == null
|
||||
? _libraryManager.RootFolder
|
||||
: _libraryManager.GetUserRootFolder();
|
||||
BaseItem? item;
|
||||
if (parentId.HasValue)
|
||||
{
|
||||
item = parentItem;
|
||||
}
|
||||
else if (user == null)
|
||||
{
|
||||
item = _libraryManager.RootFolder;
|
||||
}
|
||||
else
|
||||
{
|
||||
item = _libraryManager.GetUserRootFolder();
|
||||
}
|
||||
|
||||
var query = new InternalItemsQuery
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user