bool CPVRTimers::GetSubDirectory(const CPVRTimersPath &path, CFileItemList &items) const { bool bRadio = path.IsRadio(); unsigned int iParentId = path.GetParentId(); int iClientId = path.GetClientId(); CFileItemPtr item; CSingleLock lock(m_critSection); for (const auto &tagsEntry : m_tags) { for (const auto &timer : *tagsEntry.second) { if ((timer->m_bIsRadio == bRadio) && (timer->m_iParentClientIndex != PVR_TIMER_NO_PARENT) && (timer->m_iClientId == iClientId) && (timer->m_iParentClientIndex == iParentId)) { item.reset(new CFileItem(timer)); items.Add(item); } } } return true; }
bool CPVRTimers::GetSubDirectory(const CPVRTimersPath &path, CFileItemList &items) const { bool bRadio = path.IsRadio(); unsigned int iParentId = path.GetParentId(); int iClientId = path.GetClientId(); bool bHideDisabled = CSettings::GetInstance().GetBool(CSettings::SETTING_PVRTIMERS_HIDEDISABLEDTIMERS); CFileItemPtr item; CSingleLock lock(m_critSection); for (const auto &tagsEntry : m_tags) { for (const auto &timer : *tagsEntry.second) { if ((timer->m_bIsRadio == bRadio) && (timer->m_iParentClientIndex != PVR_TIMER_NO_PARENT) && (timer->m_iClientId == iClientId) && (timer->m_iParentClientIndex == iParentId) && (!bHideDisabled || (timer->m_state != PVR_TIMER_STATE_DISABLED))) { item.reset(new CFileItem(timer)); std::string strItemPath( CPVRTimersPath(path.GetPath(), timer->m_iClientId, timer->m_iClientIndex).GetPath()); item->SetPath(strItemPath); items.Add(item); } } } return true; }