Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

pvr: Fixed search dialog #1778

Merged
merged 1 commit into from

2 participants

@fetzerch

The guide based search was not working correctly because of incorrect
spinner values for the channel group.

Before the spinner values for the channel group were created by a call to atoi:

atoi("channels/tv/2/")

This returned 0 for all channel groups.

The new code uses a call to GroupID().

@fetzerch fetzerch pvr: Fixed search dialog
The guide based search was not working correctly because of incorrect
spinner values for the channel group.
6042cd0
@opdenkamp
Collaborator

+1, assigned to @cptspiff

@ghost ghost was assigned
@opdenkamp opdenkamp merged commit 85c5d13 into xbmc:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 13, 2012
  1. @fetzerch

    pvr: Fixed search dialog

    fetzerch authored
    The guide based search was not working correctly because of incorrect
    spinner values for the channel group.
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 8 deletions.
  1. +9 −8 xbmc/pvr/dialogs/GUIDialogPVRGuideSearch.cpp
View
17 xbmc/pvr/dialogs/GUIDialogPVRGuideSearch.cpp
@@ -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);
}
Something went wrong with that request. Please try again.