mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 05:53:03 +03:00
Use GetParentItem where applicable
This commit is contained in:
@@ -239,14 +239,8 @@ namespace Jellyfin.Api.Controllers
|
||||
parentId = null;
|
||||
}
|
||||
|
||||
BaseItem? item = null;
|
||||
var item = _libraryManager.GetParentItem(parentId, userId);
|
||||
QueryResult<BaseItem> result;
|
||||
if (parentId.HasValue)
|
||||
{
|
||||
item = _libraryManager.GetItemById(parentId.Value);
|
||||
}
|
||||
|
||||
item ??= _libraryManager.GetUserRootFolder();
|
||||
|
||||
if (!(item is Folder folder))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user