本文整理汇总了C++中CEpgInfoTagPtr::Plot方法的典型用法代码示例。如果您正苦于以下问题:C++ CEpgInfoTagPtr::Plot方法的具体用法?C++ CEpgInfoTagPtr::Plot怎么用?C++ CEpgInfoTagPtr::Plot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CEpgInfoTagPtr
的用法示例。
在下文中一共展示了CEpgInfoTagPtr::Plot方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RemoveDuplicates
int EpgSearchFilter::RemoveDuplicates(CFileItemList &results)
{
unsigned int iSize = results.Size();
for (unsigned int iResultPtr = 0; iResultPtr < iSize; iResultPtr++)
{
const CEpgInfoTagPtr epgentry_1(results.Get(iResultPtr)->GetEPGInfoTag());
if (!epgentry_1)
continue;
for (unsigned int iTagPtr = 0; iTagPtr < iSize; iTagPtr++)
{
if (iResultPtr == iTagPtr)
continue;
const CEpgInfoTagPtr epgentry_2(results.Get(iTagPtr)->GetEPGInfoTag());
if (!epgentry_2)
continue;
if (epgentry_1->Title() != epgentry_2->Title() ||
epgentry_1->Plot() != epgentry_2->Plot() ||
epgentry_1->PlotOutline() != epgentry_2->PlotOutline())
continue;
results.Remove(iTagPtr);
iResultPtr--;
iTagPtr--;
iSize--;
}
}
return iSize;
}
示例2: FilterRecordings
int EpgSearchFilter::FilterRecordings(CFileItemList &results)
{
int iRemoved(0);
if (!g_PVRManager.IsStarted())
return iRemoved;
CFileItemList recordings;
g_PVRRecordings->GetAll(recordings);
// TODO inefficient!
CPVRRecordingPtr recording;
for (int iRecordingPtr = 0; iRecordingPtr < recordings.Size(); iRecordingPtr++)
{
recording = recordings.Get(iRecordingPtr)->GetPVRRecordingInfoTag();
if (!recording)
continue;
for (int iResultPtr = 0; iResultPtr < results.Size(); iResultPtr++)
{
const CEpgInfoTagPtr epgentry(results.Get(iResultPtr)->GetEPGInfoTag());
/* no match */
if (!epgentry ||
epgentry->Title() != recording->m_strTitle ||
epgentry->Plot() != recording->m_strPlot)
continue;
results.Remove(iResultPtr);
iResultPtr--;
++iRemoved;
}
}
return iRemoved;
}
示例3: CreateFromEpg
CPVRTimerInfoTagPtr CPVRTimerInfoTag::CreateFromEpg(const CEpgInfoTagPtr &tag)
{
/* create a new timer */
CPVRTimerInfoTagPtr newTag(new CPVRTimerInfoTag());
if (!newTag)
{
CLog::Log(LOGERROR, "%s - couldn't create new timer", __FUNCTION__);
return CPVRTimerInfoTagPtr();
}
/* check if a valid channel is set */
CPVRChannelPtr channel = tag->ChannelTag();
if (!channel)
{
CLog::Log(LOGERROR, "%s - no channel set", __FUNCTION__);
return CPVRTimerInfoTagPtr();
}
/* check if the epg end date is in the future */
if (tag->EndAsLocalTime() < CDateTime::GetCurrentDateTime())
{
CLog::Log(LOGERROR, "%s - end time is in the past", __FUNCTION__);
return CPVRTimerInfoTagPtr();
}
/* set the timer data */
CDateTime newStart = tag->StartAsUTC();
CDateTime newEnd = tag->EndAsUTC();
newTag->m_iClientIndex = -1;
newTag->m_strTitle = tag->Title().empty() ? channel->ChannelName() : tag->Title();
newTag->m_iChannelNumber = channel->ChannelNumber();
newTag->m_iClientChannelUid = channel->UniqueID();
newTag->m_iClientId = channel->ClientID();
newTag->m_bIsRadio = channel->IsRadio();
newTag->m_iGenreType = tag->GenreType();
newTag->m_iGenreSubType = tag->GenreSubType();
newTag->m_channel = channel;
newTag->SetStartFromUTC(newStart);
newTag->SetEndFromUTC(newEnd);
if (tag->Plot().empty())
{
newTag->m_strSummary= StringUtils::Format("%s %s %s %s %s",
newTag->StartAsLocalTime().GetAsLocalizedDate().c_str(),
g_localizeStrings.Get(19159).c_str(),
newTag->StartAsLocalTime().GetAsLocalizedTime("", false).c_str(),
g_localizeStrings.Get(19160).c_str(),
newTag->EndAsLocalTime().GetAsLocalizedTime("", false).c_str());
}
else
{
newTag->m_strSummary = tag->Plot();
}
newTag->m_epgTag = g_EpgContainer.GetById(tag->EpgID())->GetTag(tag->StartAsUTC());
/* unused only for reference */
newTag->m_strFileNameAndPath = "pvr://timers/new";
return newTag;
}