CPVRChannelPtr CPVRGUIChannelNavigator::GetNextOrPrevChannel(bool bNext) { const bool bPlayingRadio = CServiceBroker::GetPVRManager().IsPlayingRadio(); const bool bPlayingTV = CServiceBroker::GetPVRManager().IsPlayingTV(); if (bPlayingTV || bPlayingRadio) { const CPVRChannelGroupPtr group = CServiceBroker::GetPVRManager().GetPlayingGroup(bPlayingRadio); if (group) { CSingleLock lock(m_critSection); const CFileItemPtr item = bNext ? group->GetNextChannel(m_currentChannel) : group->GetPreviousChannel(m_currentChannel);; if (item) return item->GetPVRChannelInfoTag(); } } return CPVRChannelPtr(); }
CPVRChannelPtr CPVRItem::GetChannel() const { if (m_item->IsPVRChannel()) { return m_item->GetPVRChannelInfoTag(); } else if (m_item->IsEPG()) { return m_item->GetEPGInfoTag()->ChannelTag(); } else if (m_item->IsPVRTimer()) { const CEpgInfoTagPtr epgTag(m_item->GetPVRTimerInfoTag()->GetEpgInfoTag()); if (epgTag) return epgTag->ChannelTag(); } else { CLog::Log(LOGERROR, "CPVRItem - %s - unsupported item type!", __FUNCTION__); } return CPVRChannelPtr(); }