Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ListItem.IsParentFolder infobool #8775

Merged
merged 1 commit into from
Jan 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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