本文整理汇总了C++中CMusicArtistInfo::SetLoaded方法的典型用法代码示例。如果您正苦于以下问题:C++ CMusicArtistInfo::SetLoaded方法的具体用法?C++ CMusicArtistInfo::SetLoaded怎么用?C++ CMusicArtistInfo::SetLoaded使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMusicArtistInfo
的用法示例。
在下文中一共展示了CMusicArtistInfo::SetLoaded方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateDatabaseArtistInfo
INFO_RET CMusicInfoScanner::UpdateDatabaseArtistInfo(CArtist& artist, const ADDON::ScraperPtr& scraper, bool bAllowSelection, CGUIDialogProgress* pDialog /* = NULL */)
{
if (!scraper)
return INFO_ERROR;
CMusicArtistInfo artistInfo;
loop:
CLog::Log(LOGDEBUG, "%s downloading info for: %s", __FUNCTION__, artist.strArtist.c_str());
INFO_RET artistDownloadStatus = DownloadArtistInfo(artist, scraper, artistInfo, pDialog);
if (artistDownloadStatus == INFO_NOT_FOUND)
{
if (pDialog && bAllowSelection)
{
if (!CGUIKeyboardFactory::ShowAndGetInput(artist.strArtist, g_localizeStrings.Get(16025), false))
return INFO_CANCELLED;
goto loop;
}
}
else if (artistDownloadStatus == INFO_ADDED)
{
artist.MergeScrapedArtist(artistInfo.GetArtist(), CSettings::Get().GetBool("musiclibrary.overridetags"));
m_musicDatabase.Open();
m_musicDatabase.UpdateArtist(artist);
m_musicDatabase.GetArtistPath(artist.idArtist, artist.strPath);
m_musicDatabase.SetArtForItem(artist.idArtist, MediaTypeArtist, GetArtistArtwork(artist));
m_musicDatabase.Close();
artistInfo.SetLoaded();
}
return artistDownloadStatus;
}
示例2: FindArtistInfo
bool CGUIWindowMusicBase::FindArtistInfo(const CStdString& strArtist, CMusicArtistInfo& artist, const SScraperInfo& info, ALLOW_SELECTION allowSelection)
{
// quietly return if Internet lookups are disabled
if (!g_guiSettings.GetBool("network.enableinternet")) return false;
// show dialog box indicating we're searching the album
if (m_dlgProgress && allowSelection != SELECTION_AUTO)
{
m_dlgProgress->SetHeading(21889);
m_dlgProgress->SetLine(0, strArtist);
m_dlgProgress->SetLine(1, "");
m_dlgProgress->SetLine(2, "");
m_dlgProgress->StartModal();
}
CMusicInfoScanner scanner;
CStdString strPath;
long idArtist = m_musicdatabase.GetArtistByName(strArtist);
strPath.Format("musicdb://2/%u/",idArtist);
if (!scanner.DownloadArtistInfo(strPath,strArtist,m_dlgProgress))
{ // no albums found
CGUIDialogOK::ShowAndGetInput(21889, 0, 20198, 0);
return false;
}
m_musicdatabase.GetArtistInfo(idArtist,artist.GetArtist());
artist.SetLoaded(true);
return true;
}