Skip to content

Commit

Permalink
pvr: Fixed search dialog
Browse files Browse the repository at this point in the history
The guide based search was not working correctly because of incorrect
spinner values for the channel group.
  • Loading branch information
fetzerch committed Nov 13, 2012
1 parent 860cd91 commit 6042cd0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions xbmc/pvr/dialogs/GUIDialogPVRGuideSearch.cpp
Expand Up @@ -95,21 +95,22 @@ void CGUIDialogPVRGuideSearch::UpdateChannelSpin(void)

void CGUIDialogPVRGuideSearch::UpdateGroupsSpin(void)
{
CFileItemList groups;
CGUISpinControlEx *pSpin = (CGUISpinControlEx *)GetControl(CONTROL_SPIN_GROUPS);
if (!pSpin)
return;

std::vector<CPVRChannelGroupPtr> group;
std::vector<CPVRChannelGroupPtr>::const_iterator it;

/* tv groups */
g_PVRChannelGroups->GetTV()->GetGroupList(&groups);
for (int iGroupPtr = 0; iGroupPtr < groups.Size(); iGroupPtr++)
pSpin->AddLabel(groups[iGroupPtr]->GetLabel(), atoi(groups[iGroupPtr]->GetPath()));
group = g_PVRChannelGroups->GetTV()->GetMembers();
for (it = group.begin(); it != group.end(); ++it)
pSpin->AddLabel((*it)->GroupName(), (*it)->GroupID());

/* radio groups */
groups.ClearItems();
g_PVRChannelGroups->GetRadio()->GetGroupList(&groups);
for (int iGroupPtr = 0; iGroupPtr < groups.Size(); iGroupPtr++)
pSpin->AddLabel(groups[iGroupPtr]->GetLabel(), atoi(groups[iGroupPtr]->GetPath()));
group = g_PVRChannelGroups->GetRadio()->GetMembers();
for (it = group.begin(); it != group.end(); ++it)
pSpin->AddLabel((*it)->GroupName(), (*it)->GroupID());

pSpin->SetValue(m_searchFilter->m_iChannelGroup);
}
Expand Down

0 comments on commit 6042cd0

Please sign in to comment.