Skip to content

Commit

Permalink
add ListItem.IsParentFolder infobool
Browse files Browse the repository at this point in the history
  • Loading branch information
ronie committed Jan 9, 2016
1 parent ea3f2fc commit 1192a14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions xbmc/GUIInfoManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ const infomap listitem_labels[]= {{ "thumb", LISTITEM_THUMB },
{ "isresumable", LISTITEM_IS_RESUMABLE},
{ "percentplayed", LISTITEM_PERCENT_PLAYED},
{ "isfolder", LISTITEM_IS_FOLDER },
{ "isparentfolder", LISTITEM_IS_PARENTFOLDER },
{ "iscollection", LISTITEM_IS_COLLECTION },
{ "originaltitle", LISTITEM_ORIGINALTITLE },
{ "lastplayed", LISTITEM_LASTPLAYED },
Expand Down Expand Up @@ -5929,6 +5930,14 @@ bool CGUIInfoManager::GetItemBool(const CGUIListItem *item, int condition) const
return item->IsSelected();
else if (condition == LISTITEM_IS_FOLDER)
return item->m_bIsFolder;
else if (condition == LISTITEM_IS_PARENTFOLDER)
{
if (item->IsFileItem())
{
const CFileItem *pItem = (const CFileItem *)item;
return pItem->IsParentFolder();
}
}
else if (condition == LISTITEM_IS_RESUMABLE)
{
if (item->IsFileItem())
Expand Down
1 change: 1 addition & 0 deletions xbmc/guiinfo/GUIInfoLabels.h
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,7 @@
#define LISTITEM_TAG (LISTITEM_START + 154)
#define LISTITEM_SET (LISTITEM_START + 155)
#define LISTITEM_SETID (LISTITEM_START + 156)
#define LISTITEM_IS_PARENTFOLDER (LISTITEM_START + 157)

#define LISTITEM_PROPERTY_START (LISTITEM_START + 200)
#define LISTITEM_PROPERTY_END (LISTITEM_PROPERTY_START + 1200)
Expand Down

0 comments on commit 1192a14

Please sign in to comment.