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

[PVR] PVR windows: Fix channelgroup listener registration. #11305

Merged
merged 1 commit into from Dec 31, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions xbmc/pvr/windows/GUIWindowPVRBase.cpp
Expand Up @@ -300,9 +300,10 @@ bool CGUIWindowPVRBase::InitChannelGroup()
if (m_channelGroup != group)
{
m_viewControl.SetSelectedItem(0);
m_channelGroup = group;
m_vecItems->SetPath(GetDirectoryPath());
SetChannelGroup(group, false);

This comment was marked as spam.

This comment was marked as spam.

}
// Path might have changed since last init. Set it always, not just on group change.
m_vecItems->SetPath(GetDirectoryPath());
return true;
}
return false;
Expand All @@ -314,7 +315,7 @@ CPVRChannelGroupPtr CGUIWindowPVRBase::GetChannelGroup(void)
return m_channelGroup;
}

void CGUIWindowPVRBase::SetChannelGroup(const CPVRChannelGroupPtr &group)
void CGUIWindowPVRBase::SetChannelGroup(const CPVRChannelGroupPtr &group, bool bUpdate /* = true */)
{
if (!group)
return;
Expand All @@ -333,7 +334,7 @@ void CGUIWindowPVRBase::SetChannelGroup(const CPVRChannelGroupPtr &group)
}
}

if (channelGroup)
if (bUpdate && channelGroup)
{
g_PVRManager.SetPlayingGroup(channelGroup);
Update(GetDirectoryPath());
Expand Down
19 changes: 17 additions & 2 deletions xbmc/pvr/windows/GUIWindowPVRBase.h
Expand Up @@ -82,9 +82,24 @@ namespace PVR

virtual void ClearData();

/*!
* @brief Init this window's channel group with the currently active (the "playing") channel group.
* @return true if group could be set, false otherwise.
*/
bool InitChannelGroup(void);
virtual CPVRChannelGroupPtr GetChannelGroup(void);
virtual void SetChannelGroup(const CPVRChannelGroupPtr &group);

/*!
* @brief Get the channel group for this window.
* @return the group or null, if no group set.
*/
virtual CPVRChannelGroupPtr GetChannelGroup(void);

/*!
* @brief Set a new channel group, start listening to this group, optionally update window content.
* @param group The new group.
* @param bUpdate if true, window content will be updated.
*/
void SetChannelGroup(const CPVRChannelGroupPtr &group, bool bUpdate = true);

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.


virtual void UpdateSelectedItemPath();

Expand Down