bool CPVRChannelGroup::Update(const CPVRChannelGroup &group) { CSingleLock lock(m_critSection); if (!m_strGroupName.Equals(group.GroupName()) || m_iSortOrder != group.SortOrder()) { m_bChanged = true; m_strGroupName = group.GroupName(); m_iSortOrder = group.SortOrder(); } return true; }
bool CPVRChannelGroups::Update(const CPVRChannelGroup &group) { int iIndex = GetIndexForGroupID(group.GroupID()); if (iIndex < 0) { CLog::Log(LOGDEBUG, "PVRChannelGroups - %s - new %s channel group '%s'", __FUNCTION__, m_bRadio ? "radio" : "TV", group.GroupName().c_str()); push_back(new CPVRChannelGroup(m_bRadio, group.GroupID(), group.GroupName(), group.SortOrder())); } else { CLog::Log(LOGDEBUG, "PVRChannelGroups - %s - updating %s channel group '%s'", __FUNCTION__, m_bRadio ? "radio" : "TV", group.GroupName().c_str()); at(iIndex)->SetGroupName(group.GroupName()); at(iIndex)->SetSortOrder(group.SortOrder()); } return true; }