Split nested conditional

pull/4633/head
crobibero 4 years ago
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…
Cancel
Save