bool CGUIWindowPVRSearch::OnContextButton(const CFileItem &item, CONTEXT_BUTTON button) { bool bReturn = false; switch(button) { case CONTEXT_BUTTON_FIND: { m_searchfilter.Reset(); // construct the search term if (item.IsEPG()) m_searchfilter.m_strSearchTerm = "\"" + item.GetEPGInfoTag()->Title() + "\""; else if (item.IsPVRChannel()) { CEpgInfoTagPtr tag(item.GetPVRChannelInfoTag()->GetEPGNow()); if (tag) m_searchfilter.m_strSearchTerm = "\"" + tag->Title() + "\""; } else if (item.IsUsablePVRRecording()) m_searchfilter.m_strSearchTerm = "\"" + item.GetPVRRecordingInfoTag()->m_strTitle + "\""; else if (item.IsPVRTimer()) m_searchfilter.m_strSearchTerm = "\"" + item.GetPVRTimerInfoTag()->m_strTitle + "\""; m_bSearchConfirmed = true; Refresh(true); bReturn = true; break; } default: bReturn = false; } return bReturn; }
bool CPVRManager::FillStreamFileItem(CFileItem &fileItem) { if (fileItem.IsPVRChannel()) return m_addons->FillChannelStreamFileItem(fileItem); else if (fileItem.IsPVRRecording()) return m_addons->FillRecordingStreamFileItem(fileItem); else if (fileItem.IsEPG()) return m_addons->FillEpgTagStreamFileItem(fileItem); else return false; }
bool CPVRManager::FillStreamFileItem(CFileItem &fileItem) { const CPVRClientPtr client = GetClient(fileItem); if (client) { if (fileItem.IsPVRChannel()) return client->FillChannelStreamFileItem(fileItem) == PVR_ERROR_NO_ERROR; else if (fileItem.IsPVRRecording()) return client->FillRecordingStreamFileItem(fileItem) == PVR_ERROR_NO_ERROR; else if (fileItem.IsEPG()) return client->FillEpgTagStreamFileItem(fileItem) == PVR_ERROR_NO_ERROR; } return false; }