Added ParentId to ApiBaseItem

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti 2012-07-31 21:48:51 -04:00
parent d6a0e8dbc5
commit 8edc1ce710
2 changed files with 4 additions and 1 deletions

View File

@ -30,7 +30,8 @@ namespace MediaBrowser.Api
Item = item,
UserItemData = Kernel.Instance.GetUserItemData(userId, item.Id),
Type = item.GetType().Name,
IsFolder = (item is Folder)
IsFolder = (item is Folder),
ParentId = item.Parent == null ? Guid.Empty : item.Parent.Id
};
if (includeChildren)

View File

@ -26,6 +26,8 @@ namespace MediaBrowser.Model.Entities
public bool IsFolder { get; set; }
public Guid ParentId { get; set; }
public string Type { get; set; }
public bool IsType(Type type)