本文整理汇总了C++中addon::ScraperPtr::reset方法的典型用法代码示例。如果您正苦于以下问题:C++ ScraperPtr::reset方法的具体用法?C++ ScraperPtr::reset怎么用?C++ ScraperPtr::reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类addon::ScraperPtr
的用法示例。
在下文中一共展示了ScraperPtr::reset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Show
bool CGUIDialogContentSettings::Show(ADDON::ScraperPtr& scraper, VIDEO::SScanSettings& settings, bool& bRunScan, CONTENT_TYPE musicContext/*=CONTENT_NONE*/)
{
CGUIDialogContentSettings *dialog = (CGUIDialogContentSettings *)g_windowManager.GetWindow(WINDOW_DIALOG_CONTENT_SETTINGS);
if (!dialog)
return false;
if (scraper)
{
dialog->m_content = musicContext != CONTENT_NONE ? musicContext : scraper->Content();
dialog->m_origContent = dialog->m_content;
dialog->m_scraper = scraper;
// toast selected but disabled scrapers
if (!scraper->Enabled())
g_application.m_guiDialogKaiToast.QueueNotification(CGUIDialogKaiToast::Error, g_localizeStrings.Get(24023), scraper->Name(), 2000, true);
}
dialog->m_bRunScan = bRunScan;
dialog->m_bScanRecursive = (settings.recurse > 0 && !settings.parent_name) || (settings.recurse > 1 && settings.parent_name);
dialog->m_bUseDirNames = settings.parent_name;
dialog->m_bExclude = settings.exclude;
dialog->m_bSingleItem = settings.parent_name_root;
dialog->m_bNoUpdate = settings.noupdate;
dialog->m_bNeedSave = false;
dialog->DoModal();
if (dialog->m_bNeedSave)
{
scraper = boost::dynamic_pointer_cast<CScraper>(dialog->m_scraper);
CONTENT_TYPE content = dialog->m_content;
if (!scraper || content == CONTENT_NONE)
{
scraper.reset();
bRunScan = false;
settings.exclude = dialog->m_bExclude;
}
else
{
settings.exclude = false;
settings.noupdate = dialog->m_bNoUpdate;
bRunScan = dialog->m_bRunScan;
scraper->SetPathSettings(content, "");
if (content == CONTENT_TVSHOWS)
{
settings.parent_name = dialog->m_bSingleItem;
settings.parent_name_root = dialog->m_bSingleItem;
settings.recurse = 0;
}
else if (content == CONTENT_MOVIES)
{
if (dialog->m_bUseDirNames)
{
settings.parent_name = true;
settings.parent_name_root = false;
settings.recurse = dialog->m_bScanRecursive ? INT_MAX : 1;
if (dialog->m_bSingleItem)
{
settings.parent_name_root = true;
settings.recurse = 0;
}
}
else
{
settings.parent_name = false;
settings.parent_name_root = false;
settings.recurse = dialog->m_bScanRecursive ? INT_MAX : 0;
}
}
else if (content == CONTENT_MUSICVIDEOS)
{
settings.parent_name = false;
settings.parent_name_root = false;
settings.recurse = dialog->m_bScanRecursive ? INT_MAX : 0;
}
}
}
dialog->m_scraper.reset();
dialog->m_content = dialog->m_origContent = CONTENT_NONE;
return dialog->m_bNeedSave;
}