Split nested conditional

This commit is contained in:
crobibero 2020-12-01 12:10:11 -07:00
parent 2055d49701
commit f48e47be5f

View File

@ -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
{