예제 #1
0
int CPVRChannelGroup::GetEPGNowOrNext(CFileItemList &results, bool bGetNext) const
{
  int iInitialSize = results.Size();
  CEpg* epg;
  CEpgInfoTagPtr epgNext;
  CPVRChannelPtr channel;
  CSingleLock lock(m_critSection);

  for (PVR_CHANNEL_GROUP_SORTED_MEMBERS::const_iterator it = m_sortedMembers.begin(); it != m_sortedMembers.end(); ++it)
  {
    channel = (*it).channel;
    epg = channel->GetEPG();
    if (epg && !channel->IsHidden())
    {
      epgNext = bGetNext ? epg->GetTagNext() : epg->GetTagNow();
      if (epgNext)
      {
        CFileItemPtr entry(new CFileItem(epgNext));
        entry->SetLabel2(epgNext->StartAsLocalTime().GetAsLocalizedTime("", false));
        entry->SetPath(channel->Path());
        entry->SetArt("thumb", channel->IconPath());
        results.Add(entry);
      }
    }
  }

  return results.Size() - iInitialSize;
}
예제 #2
0
int CPVRChannelGroup::GetEPGNext(CFileItemList &results) const
{
  int iInitialSize = results.Size();
  CEpg* epg;
  CSingleLock lock(m_critSection);

  for (std::vector<PVRChannelGroupMember>::const_iterator it = m_members.begin(); it != m_members.end(); ++it)
  {
    epg = (*it).channel->GetEPG();
    if (!epg || !epg->HasValidEntries() || (*it).channel->IsHidden())
      continue;

    CEpgInfoTagPtr epgNext(epg->GetTagNext());
    if (!epgNext)
      continue;

    CFileItemPtr entry(new CFileItem(epgNext));
    entry->SetLabel2(epgNext->StartAsLocalTime().GetAsLocalizedTime("", false));
    entry->SetPath((*it).channel->Path());
    entry->SetArt("thumb", (*it).channel->IconPath());
    results.Add(entry);
  }

  return results.Size() - iInitialSize;
}
예제 #3
0
파일: PVRChannel.cpp 프로젝트: ncvann/xbmc
CEpgInfoTagPtr CPVRChannel::GetEPGNext() const
{
    CEpg *epg = GetEPG();
    if (epg)
        return epg->GetTagNext();

    CEpgInfoTagPtr empty;
    return empty;
}