本文整理汇总了C++中CMusicInfoScanner::DownloadAlbumInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ CMusicInfoScanner::DownloadAlbumInfo方法的具体用法?C++ CMusicInfoScanner::DownloadAlbumInfo怎么用?C++ CMusicInfoScanner::DownloadAlbumInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CMusicInfoScanner
的用法示例。
在下文中一共展示了CMusicInfoScanner::DownloadAlbumInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FindAlbumInfo
bool CGUIWindowMusicBase::FindAlbumInfo(const CStdString& strAlbum, const CStdString& strArtist, CMusicAlbumInfo& album, 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(185);
m_dlgProgress->SetLine(0, strAlbum);
m_dlgProgress->SetLine(1, strArtist);
m_dlgProgress->SetLine(2, "");
m_dlgProgress->StartModal();
}
CMusicInfoScanner scanner;
CStdString strPath;
CStdString strTempAlbum(strAlbum);
CStdString strTempArtist(strArtist);
long idAlbum = m_musicdatabase.GetAlbumByName(strAlbum,strArtist);
strPath.Format("musicdb://3/%d/",idAlbum);
bool bCanceled(false);
bool needsRefresh(true);
do
{
if (!scanner.DownloadAlbumInfo(strPath,strTempArtist,strTempAlbum,bCanceled,album,m_dlgProgress))
{
if (m_dlgProgress && allowSelection != SELECTION_AUTO)
{
if (!CGUIDialogKeyboard::ShowAndGetInput(strTempAlbum, g_localizeStrings.Get(16011), false))
return false;
if (!CGUIDialogKeyboard::ShowAndGetInput(strTempArtist, g_localizeStrings.Get(16025), false))
return false;
}
else
needsRefresh = false;
}
else
needsRefresh = false;
}
while (needsRefresh || bCanceled);
// Read the album information from the database if we are dealing with a DB album.
if (idAlbum != -1)
m_musicdatabase.GetAlbumInfo(idAlbum,album.GetAlbum(),&album.GetAlbum().songs);
album.SetLoaded(true);
return true;
}