diff --git a/MediaBrowser.Api/ApiService.cs b/MediaBrowser.Api/ApiService.cs index 30a364d7f..34f7e69e7 100644 --- a/MediaBrowser.Api/ApiService.cs +++ b/MediaBrowser.Api/ApiService.cs @@ -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) diff --git a/MediaBrowser.Model/Entities/ApiBaseItem.cs b/MediaBrowser.Model/Entities/ApiBaseItem.cs index b3fbbbcde..341b1c77f 100644 --- a/MediaBrowser.Model/Entities/ApiBaseItem.cs +++ b/MediaBrowser.Model/Entities/ApiBaseItem.cs @@ -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)