コード例 #1
0
ファイル: PVRChannelGroup.cpp プロジェクト: Omel/xbmc
int CPVRChannelGroup::GetEPGNext(CFileItemList &results)
{
  int iInitialSize = results.Size();
  CSingleLock lock(m_critSection);

  for (unsigned int iChannelPtr = 0; iChannelPtr < size(); iChannelPtr++)
  {
    CPVRChannel *channel = at(iChannelPtr).channel;
    CEpg *epg = channel->GetEPG();
    if (!epg || !epg->HasValidEntries() || at(iChannelPtr).channel->IsHidden())
      continue;

    CEpgInfoTag epgNow;
    if (!epg->InfoTagNext(epgNow))
      continue;

    CFileItemPtr entry(new CFileItem(epgNow));
    entry->SetLabel2(epgNow.StartAsLocalTime().GetAsLocalizedTime(StringUtils::EmptyString, false));
    entry->SetPath(channel->ChannelName());
    entry->SetThumbnailImage(channel->IconPath());
    results.Add(entry);
  }

  return results.Size() - iInitialSize;
}
コード例 #2
0
ファイル: PVRChannelGroup.cpp プロジェクト: Dr-Romantic/xbmc
int CPVRChannelGroup::GetEPGNext(CFileItemList &results)
{
  int iInitialSize = results.Size();
  CSingleLock lock(m_critSection);

  for (unsigned int iChannelPtr = 0; iChannelPtr < m_members.size(); iChannelPtr++)
  {
    CPVRChannelPtr channel = m_members.at(iChannelPtr).channel;
    CEpg *epg = channel->GetEPG();
    if (!epg || !epg->HasValidEntries() || m_members.at(iChannelPtr).channel->IsHidden())
      continue;

    CEpgInfoTag epgNow;
    if (!epg->InfoTagNext(epgNow))
      continue;

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

  return results.Size() - iInitialSize;
}
コード例 #3
0
ファイル: PVRChannelGroup.cpp プロジェクト: DanTheMan827/xbmc
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;
}