本文整理汇总了C++中ProgramInfo::GetInetRef方法的典型用法代码示例。如果您正苦于以下问题:C++ ProgramInfo::GetInetRef方法的具体用法?C++ ProgramInfo::GetInetRef怎么用?C++ ProgramInfo::GetInetRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProgramInfo
的用法示例。
在下文中一共展示了ProgramInfo::GetInetRef方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CopyRuleInetrefsToRecordings
void LookerUpper::CopyRuleInetrefsToRecordings()
{
QMap< QString, ProgramInfo* > recMap;
QMap< QString, uint32_t > inUseMap = ProgramInfo::QueryInUseMap();
QMap< QString, bool > isJobRunning = ProgramInfo::QueryJobsRunning(JOB_COMMFLAG);
ProgramList progList;
LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, -1 );
for( int n = 0; n < (int)progList.size(); n++)
{
ProgramInfo *pginfo = new ProgramInfo(*(progList[n]));
if (pginfo && pginfo->GetInetRef().isEmpty())
{
RecordingRule *rule = new RecordingRule();
rule->m_recordID = pginfo->GetRecordingRuleID();
rule->Load();
if (!rule->m_inetref.isEmpty())
{
QString msg = QString("%1").arg(pginfo->GetTitle());
if (!pginfo->GetSubtitle().isEmpty())
msg += QString(": %1").arg(pginfo->GetSubtitle());
msg += " has no inetref, but its recording rule does. Copying...";
LOG(VB_GENERAL, LOG_INFO, msg);
pginfo->SaveInetRef(rule->m_inetref);
}
delete rule;
}
delete pginfo;
}
}
示例2: HandleAllRecordings
void LookerUpper::HandleAllRecordings(bool updaterules)
{
QMap< QString, ProgramInfo* > recMap;
QMap< QString, uint32_t > inUseMap = ProgramInfo::QueryInUseMap();
QMap< QString, bool > isJobRunning = ProgramInfo::QueryJobsRunning(JOB_COMMFLAG);
m_updaterules = updaterules;
ProgramList progList;
LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, -1 );
for( int n = 0; n < (int)progList.size(); n++)
{
ProgramInfo *pginfo = new ProgramInfo(*(progList[n]));
if ((pginfo->GetRecordingGroup() != "Deleted") &&
(pginfo->GetRecordingGroup() != "LiveTV") &&
(pginfo->GetInetRef().isEmpty() ||
(!pginfo->GetSubtitle().isEmpty() &&
(pginfo->GetSeason() == 0) &&
(pginfo->GetEpisode() == 0))))
{
QString msg = QString("Looking up: %1 %2").arg(pginfo->GetTitle())
.arg(pginfo->GetSubtitle());
LOG(VB_GENERAL, LOG_INFO, msg);
m_busyRecList.append(pginfo);
m_metadataFactory->Lookup(pginfo, true, false, false);
}
else
delete pginfo;
}
}
示例3: HandleAllRecordings
void LookerUpper::HandleAllRecordings()
{
QMap< QString, ProgramInfo* > recMap;
QMap< QString, uint32_t > inUseMap = ProgramInfo::QueryInUseMap();
QMap< QString, bool > isJobRunning = ProgramInfo::QueryJobsRunning(JOB_COMMFLAG);
ProgramList progList;
LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, -1 );
for( int n = 0; n < (int)progList.size(); n++)
{
ProgramInfo *pginfo = new ProgramInfo(*(progList[n]));
if (pginfo->GetInetRef().isEmpty() ||
(!pginfo->GetSubtitle().isEmpty() &&
(pginfo->GetSeason() == 0) &&
(pginfo->GetEpisode() == 0)))
{
QString msg = QString("Looking up: %1 %2").arg(pginfo->GetTitle())
.arg(pginfo->GetSubtitle());
VERBOSE(VB_IMPORTANT, msg);
m_busyRecList.append(pginfo);
m_metadataFactory->Lookup(pginfo, false, false);
}
}
}
示例4: GetRecordingArtworkList
DTC::ArtworkInfoList* Content::GetRecordingArtworkList( int RecordedId,
int chanid,
const QDateTime &recstarttsRaw)
{
if ((RecordedId <= 0) &&
(chanid <= 0 || !recstarttsRaw.isValid()))
throw QString("Recorded ID or Channel ID and StartTime appears invalid.");
// TODO Should use RecordingInfo
ProgramInfo pginfo;
if (RecordedId > 0)
pginfo = ProgramInfo(RecordedId);
else
pginfo = ProgramInfo(chanid, recstarttsRaw.toUTC());
return GetProgramArtworkList(pginfo.GetInetRef(), pginfo.GetSeason());
}
示例5: HandleAllRecordingRules
void LookerUpper::HandleAllRecordingRules()
{
m_updaterules = true;
vector<ProgramInfo *> recordingList;
RemoteGetAllScheduledRecordings(recordingList);
for( int n = 0; n < (int)recordingList.size(); n++)
{
ProgramInfo *pginfo = new ProgramInfo(*(recordingList[n]));
if (pginfo->GetInetRef().isEmpty())
{
QString msg = QString("Looking up: %1 %2").arg(pginfo->GetTitle())
.arg(pginfo->GetSubtitle());
LOG(VB_GENERAL, LOG_INFO, msg);
m_busyRecList.append(pginfo);
m_metadataFactory->Lookup(pginfo, false, false);
}
}
}
示例6: HandleAllArtwork
void LookerUpper::HandleAllArtwork(bool aggressive)
{
m_updateartwork = true;
if (aggressive)
m_updaterules = true;
// First, handle all recording rules w/ inetrefs
vector<ProgramInfo *> recordingList;
RemoteGetAllScheduledRecordings(recordingList);
int maxartnum = 3;
for( int n = 0; n < (int)recordingList.size(); n++)
{
ProgramInfo *pginfo = new ProgramInfo(*(recordingList[n]));
bool dolookup = true;
if (pginfo->GetInetRef().isEmpty())
dolookup = false;
if (dolookup || aggressive)
{
ArtworkMap map = GetArtwork(pginfo->GetInetRef(), pginfo->GetSeason(), true);
if (map.isEmpty() || (aggressive && map.count() < maxartnum))
{
QString msg = QString("Looking up artwork for recording rule: %1 %2")
.arg(pginfo->GetTitle())
.arg(pginfo->GetSubtitle());
LOG(VB_GENERAL, LOG_INFO, msg);
m_busyRecList.append(pginfo);
m_metadataFactory->Lookup(pginfo, true, true, true);
continue;
}
}
delete pginfo;
}
// Now, Attempt to fill in the gaps for recordings
QMap< QString, ProgramInfo* > recMap;
QMap< QString, uint32_t > inUseMap = ProgramInfo::QueryInUseMap();
QMap< QString, bool > isJobRunning = ProgramInfo::QueryJobsRunning(JOB_COMMFLAG);
ProgramList progList;
LoadFromRecorded( progList, false, inUseMap, isJobRunning, recMap, -1 );
for( int n = 0; n < (int)progList.size(); n++)
{
ProgramInfo *pginfo = new ProgramInfo(*(progList[n]));
bool dolookup = true;
LookupType type = GuessLookupType(pginfo);
if (type == kProbableMovie)
maxartnum = 2;
if ((!aggressive && type == kProbableGenericTelevision) ||
pginfo->GetRecordingGroup() == "Deleted" ||
pginfo->GetRecordingGroup() == "LiveTV")
dolookup = false;
if (dolookup || aggressive)
{
ArtworkMap map = GetArtwork(pginfo->GetInetRef(), pginfo->GetSeason(), true);
if (map.isEmpty() || (aggressive && map.count() < maxartnum))
{
QString msg = QString("Looking up artwork for recording: %1 %2")
.arg(pginfo->GetTitle())
.arg(pginfo->GetSubtitle());
LOG(VB_GENERAL, LOG_INFO, msg);
m_busyRecList.append(pginfo);
m_metadataFactory->Lookup(pginfo, true, true, aggressive);
continue;
}
}
delete pginfo;
}
}