diff options
author | janbar <jlbarriere68@gmail.com> | 2014-10-24 22:19:21 +0200 |
---|---|---|
committer | janbar <jlbarriere68@gmail.com> | 2014-10-24 22:19:21 +0200 |
commit | dc2dfe30111f52006b0a4de0220e1f8e36792edf (patch) | |
tree | 15ca857d099abff1f3a653802e4115d739436492 | |
parent | 0dbe175e7c61cfc0c5ea0032c6a9a303f915c951 (diff) |
[pvr] Fix unexpected sub channel merge in EPG grid
Using backend channel number, number would be not unique if any sub channel exist.
So don't use it to sense channel breaks. Use unique channel identifier instead.
-rw-r--r-- | xbmc/epg/GUIEPGGridContainer.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/xbmc/epg/GUIEPGGridContainer.cpp b/xbmc/epg/GUIEPGGridContainer.cpp index 8a9faed520..bb11a5ea1d 100644 --- a/xbmc/epg/GUIEPGGridContainer.cpp +++ b/xbmc/epg/GUIEPGGridContainer.cpp @@ -748,26 +748,25 @@ bool CGUIEPGGridContainer::OnMessage(CGUIMessage& message) } /* Create Channel items */ - int iLastChannelNumber = -1; + int iLastChannelID = -1; ItemsPtr itemsPointer; itemsPointer.start = 0; for (unsigned int i = 0; i < m_programmeItems.size(); ++i) { const CEpgInfoTag* tag = ((CFileItem*)m_programmeItems[i].get())->GetEPGInfoTag(); - int iCurrentChannelNumber = tag->PVRChannelNumber(); - if (iCurrentChannelNumber != iLastChannelNumber) + CPVRChannelPtr channel = tag->ChannelTag(); + if (!channel) + continue; + int iCurrentChannelID = channel->ChannelID(); + if (iCurrentChannelID != iLastChannelID) { - CPVRChannelPtr channel = tag->ChannelTag(); - if (!channel) - continue; - if (i > 0) { itemsPointer.stop = i-1; m_epgItemsPtr.push_back(itemsPointer); itemsPointer.start = i; } - iLastChannelNumber = iCurrentChannelNumber; + iLastChannelID = iCurrentChannelID; CGUIListItemPtr item(new CFileItem(*channel)); m_channelItems.push_back(item); } |