Skip to content
Browse files

Merge branch 'PR510'. closes #510

  • Loading branch information...
2 parents 111d12e + 13a015b commit d3cb7abb3ccb32e4572e6617b65b5031618439b4 @opdenkamp opdenkamp committed
Showing with 31 additions and 0 deletions.
  1. +7 −0 xbmc/epg/Epg.cpp
  2. +12 −0 xbmc/epg/EpgInfoTag.cpp
  3. +12 −0 xbmc/epg/EpgInfoTag.h
View
7 xbmc/epg/Epg.cpp
@@ -672,6 +672,13 @@ bool CEpg::UpdateMetadata(const CEpg &epg, bool bUpdateDb /* = false */)
{
m_iPVRChannelId = epg.m_iPVRChannelId;
m_iPVRChannelNumber = epg.m_iPVRChannelNumber;
+
+ /* Copy the new channel information to all child tags */
+ for (map<CDateTime, CEpgInfoTag *>::const_iterator it = m_tags.begin(); it != m_tags.end(); it++)
+ {
+ it->second->SetPVRChannelID(m_iPVRChannelId);
+ it->second->SetPVRChannelNumber(m_iPVRChannelNumber);
+ }
}
if (bUpdateDb)
View
12 xbmc/epg/EpgInfoTag.cpp
@@ -785,6 +785,18 @@ CPVRTimerInfoTag *CEpgInfoTag::Timer(void) const
return tag;
}
+void CEpgInfoTag::SetPVRChannelID(int iPVRChannelID)
+{
+ CSingleLock lock(m_critSection);
+ m_iPVRChannelID = iPVRChannelID;
+}
+
+void CEpgInfoTag::SetPVRChannelNumber(int iPVRChannelNumber)
+{
+ CSingleLock lock(m_critSection);
+ m_iPVRChannelNumber = iPVRChannelNumber;
+}
+
bool CEpgInfoTag::HasPVRChannel(void) const
{
CSingleLock lock(m_critSection);
View
12 xbmc/epg/EpgInfoTag.h
@@ -376,6 +376,18 @@ namespace EPG
virtual PVR::CPVRTimerInfoTag *Timer(void) const;
/*!
+ * @brief Set the PVR channel ID of the tag
+ * @param The new value
+ */
+ virtual void SetPVRChannelID(int iPVRChannelID);
+
+ /*!
+ * @brief Set the PVR channel number of the tag
+ * @param The new value
+ */
+ virtual void SetPVRChannelNumber(int iPVRChannelNumber);
+
+ /*!
* @return True if this tag has a PVR channel set.
*/
virtual bool HasPVRChannel(void) const;

0 comments on commit d3cb7ab

Please sign in to comment.
Something went wrong with that request. Please try again.