本文整理汇总了C++中MetadataLookup::GetCollectionref方法的典型用法代码示例。如果您正苦于以下问题:C++ MetadataLookup::GetCollectionref方法的具体用法?C++ MetadataLookup::GetCollectionref怎么用?C++ MetadataLookup::GetCollectionref使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MetadataLookup
的用法示例。
在下文中一共展示了MetadataLookup::GetCollectionref方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RunGrabber
// TODO
// using the MetadataLookup object as both argument input, and parsed output,
// is clumsy. break the inputs out into a separate object, and spawn a new
// MetadataLookup object in ParseMetadataItem, rather than requiring an
// existing one to reuse.
MetadataLookupList MetaGrabberScript::RunGrabber(const QStringList &args,
MetadataLookup *lookup, bool passseas)
{
MythSystemLegacy grabber(m_fullcommand, args, kMSStdOut);
MetadataLookupList list;
LOG(VB_GENERAL, LOG_INFO, QString("Running Grabber: %1 %2")
.arg(m_fullcommand).arg(args.join(" ")));
grabber.Run();
if (grabber.Wait() != GENERIC_EXIT_OK)
return list;
QByteArray result = grabber.ReadAll();
if (!result.isEmpty())
{
QDomDocument doc;
doc.setContent(result, true);
QDomElement root = doc.documentElement();
QDomElement item = root.firstChildElement("item");
while (!item.isNull())
{
MetadataLookup *tmp = ParseMetadataItem(item, lookup, passseas);
tmp->SetInetref(QString("%1_%2").arg(m_command)
.arg(tmp->GetInetref()));
if (!tmp->GetCollectionref().isEmpty())
{
tmp->SetCollectionref(QString("%1_%2").arg(m_command)
.arg(tmp->GetCollectionref()));
}
list.append(tmp);
// MetadataLookup is to be owned by the list
tmp->DecrRef();
item = item.nextSiblingElement("item");
}
}
return list;
}