mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 17:14:42 +01:00
Use GetParentItem where applicable
This commit is contained in:
@@ -2462,19 +2462,14 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
public BaseItem GetParentItem(string parentId, Guid? userId)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(parentId))
|
||||
if (string.IsNullOrEmpty(parentId))
|
||||
{
|
||||
return GetItemById(new Guid(parentId));
|
||||
return GetParentItem((Guid?)null, userId);
|
||||
}
|
||||
|
||||
if (userId.HasValue && userId != Guid.Empty)
|
||||
{
|
||||
return GetUserRootFolder();
|
||||
}
|
||||
|
||||
return RootFolder;
|
||||
return GetParentItem(new Guid(parentId), userId);
|
||||
}
|
||||
|
||||
|
||||
public BaseItem GetParentItem(Guid? parentId, Guid? userId)
|
||||
{
|
||||
if (parentId.HasValue)
|
||||
|
||||
Reference in New Issue
Block a user