opdenkamp/xbmc — Issue #399: show hidden channel
Author: juriad
Created: 2012-01-07 15:35:07+00:00
State: open

Reproduce:
In channel list in group All Channels:
1. Hide channel in context menu
2. Show hidden channels
3. Use context menu to show channel
Nothing will happen but channel should be shown again among others.

This fix toggles hidden flag, not just set true

diff --git a/xbmc/pvr/channels/PVRChannelGroupInternal.cpp b/xbmc/pvr/channels/PVRChannelGroupInternal.cpp
index d050557..08b7146 100644
--- a/xbmc/pvr/channels/PVRChannelGroupInternal.cpp
+++ b/xbmc/pvr/channels/PVRChannelGroupInternal.cpp
@@ -184,15 +184,16 @@ bool CPVRChannelGroupInternal::RemoveFromGroup(const CPVRChannel &channel)
{
realChannel->SetHidden(true, true);
++m_iHiddenChannels;
-
- /* renumber this list */
- Renumber();
-
- /* and persist */
- return Persist();
+ } else {
+ realChannel->SetHidden(false, true);
+ --m_iHiddenChannels;
}
+ /* renumber this list */
+ Renumber();
+
+ /* and persist */
+ return Persist();

- return true;
}

bool CPVRChannelGroupInternal::MoveChannel(unsigned int iOldChannelNumber, unsigned int iNewChannelNumber, bool bSaveInDb /*