void CGUIDialogPVRChannelsOSD::ShowInfo(int item) { /* Check file item is in list range and get his pointer */ if (item < 0 || item >= (int)m_vecItems->Size()) return; CFileItemPtr pItem = m_vecItems->Get(item); if (pItem && pItem->IsPVRChannel()) { CPVRChannelPtr channel(pItem->GetPVRChannelInfoTag()); if (!g_PVRManager.CheckParentalLock(channel)) return; /* Get the current running show on this channel from the EPG storage */ CEpgInfoTagPtr epgnow(channel->GetEPGNow()); if (!epgnow) return; /* Load programme info dialog */ CGUIDialogPVRGuideInfo* pDlgInfo = (CGUIDialogPVRGuideInfo*)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_GUIDE_INFO); if (!pDlgInfo) return; /* inform dialog about the file item and open dialog window */ CFileItem *itemNow = new CFileItem(epgnow); pDlgInfo->SetProgInfo(itemNow); pDlgInfo->Open(); delete itemNow; /* delete previuosly created FileItem */ } return; }
void CGUIDialogPVRGuideOSD::ShowInfo(int item) { /* Check file item is in list range and get his pointer */ if (item < 0 || item >= (int)m_vecItems->Size()) return; CFileItemPtr pItem = m_vecItems->Get(item); /* Load programme info dialog */ CGUIDialogPVRGuideInfo* pDlgInfo = (CGUIDialogPVRGuideInfo*)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_GUIDE_INFO); if (!pDlgInfo) return; /* inform dialog about the file item and open dialog window */ pDlgInfo->SetProgInfo(pItem->GetEPGInfoTag()); pDlgInfo->Open(); }
void CGUIWindowPVRBase::ShowEPGInfo(CFileItem *item) { CFileItem *tag = NULL; bool bHasChannel(false); CPVRChannelPtr channel; if (item->IsEPG()) { tag = new CFileItem(*item); if (item->GetEPGInfoTag()->HasPVRChannel()) { channel = item->GetEPGInfoTag()->ChannelTag(); bHasChannel = true; } } else if (item->IsPVRTimer()) { CEpgInfoTagPtr epg(item->GetPVRTimerInfoTag()->GetEpgInfoTag()); if (epg && epg->HasPVRChannel()) { channel = epg->ChannelTag(); bHasChannel = true; } tag = new CFileItem(epg); } else if (item->IsPVRChannel()) { CEpgInfoTagPtr epgnow(item->GetPVRChannelInfoTag()->GetEPGNow()); channel = item->GetPVRChannelInfoTag(); bHasChannel = true; if (!epgnow) { CGUIDialogOK::ShowAndGetInput(CVariant{19033}, CVariant{19055}); return; } tag = new CFileItem(epgnow); } CGUIDialogPVRGuideInfo* pDlgInfo = (CGUIDialogPVRGuideInfo*)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_GUIDE_INFO); if (tag && (!bHasChannel || g_PVRManager.CheckParentalLock(channel)) && pDlgInfo) { pDlgInfo->SetProgInfo(tag); pDlgInfo->Open(); } delete tag; }
void CGUIWindowPVRBase::ShowEPGInfo(CFileItem *item) { CEpgInfoTagPtr epgTag; CPVRChannelPtr channel; if (item->IsEPG()) { epgTag = item->GetEPGInfoTag(); channel = epgTag->ChannelTag(); } else if (item->IsPVRChannel()) { channel = item->GetPVRChannelInfoTag(); epgTag = channel->GetEPGNow(); } else if (item->IsPVRTimer()) { epgTag = item->GetPVRTimerInfoTag()->GetEpgInfoTag(); if (epgTag && epgTag->HasPVRChannel()) channel = epgTag->ChannelTag(); } if (channel && !g_PVRManager.CheckParentalLock(channel)) return; if (!epgTag) { CLog::Log(LOGERROR, "CGUIWindowPVRBase - %s - no epg tag!", __FUNCTION__); return; } CGUIDialogPVRGuideInfo* pDlgInfo = (CGUIDialogPVRGuideInfo*)g_windowManager.GetWindow(WINDOW_DIALOG_PVR_GUIDE_INFO); if (!pDlgInfo) { CLog::Log(LOGERROR, "CGUIWindowPVRBase - %s - unable to get WINDOW_DIALOG_PVR_GUIDE_INFO!", __FUNCTION__); return; } pDlgInfo->SetProgInfo(epgTag); pDlgInfo->Open(); }
bool CPVRGUIActions::ShowEPGInfo(const CFileItemPtr &item) const { const CPVRChannelPtr channel(CPVRItem(item).GetChannel()); if (channel && !g_PVRManager.CheckParentalLock(channel)) return false; const CEpgInfoTagPtr epgTag(CPVRItem(item).GetEpgInfoTag()); if (!epgTag) { CLog::Log(LOGERROR, "CPVRGUIActions - %s - no epg tag!", __FUNCTION__); return false; } CGUIDialogPVRGuideInfo* pDlgInfo = dynamic_cast<CGUIDialogPVRGuideInfo*>(g_windowManager.GetWindow(WINDOW_DIALOG_PVR_GUIDE_INFO)); if (!pDlgInfo) { CLog::Log(LOGERROR, "CPVRGUIActions - %s - unable to get WINDOW_DIALOG_PVR_GUIDE_INFO!", __FUNCTION__); return false; } pDlgInfo->SetProgInfo(epgTag); pDlgInfo->Open(); return true; }