当前位置: 首页>>代码示例>>C++>>正文


C++ CMusicInfoScanner::DownloadArtistInfo方法代码示例

本文整理汇总了C++中CMusicInfoScanner::DownloadArtistInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ CMusicInfoScanner::DownloadArtistInfo方法的具体用法?C++ CMusicInfoScanner::DownloadArtistInfo怎么用?C++ CMusicInfoScanner::DownloadArtistInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CMusicInfoScanner的用法示例。


在下文中一共展示了CMusicInfoScanner::DownloadArtistInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: 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;
}
开发者ID:jeppster,项目名称:xbmc-fork,代码行数:29,代码来源:GUIWindowMusicBase.cpp

示例2: FindArtistInfo

bool CGUIWindowMusicBase::FindArtistInfo(const CStdString& strArtist, CMusicArtistInfo& artist, ALLOW_SELECTION allowSelection)
{
  // 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;
  CStdString strTempArtist(strArtist);
  long idArtist = m_musicdatabase.GetArtistByName(strArtist);
  strPath.Format("musicdb://2/%u/",idArtist);

  bool bCanceled(false);
  bool needsRefresh(true);
  do
  {
    if (!scanner.DownloadArtistInfo(strPath,strTempArtist,bCanceled,m_dlgProgress))
    {
      if (bCanceled)
        return false;
      if (m_dlgProgress && allowSelection != SELECTION_AUTO)
      {
        if (!CGUIKeyboardFactory::ShowAndGetInput(strTempArtist, g_localizeStrings.Get(16025), false))
          return false;
      }
      else
        needsRefresh = false;
    }
    else
      needsRefresh = false;
  }
  while (needsRefresh || bCanceled);

  if (!m_musicdatabase.GetArtistInfo(idArtist,artist.GetArtist()))
    return false;

  artist.SetLoaded();
  return true;
}
开发者ID:,项目名称:,代码行数:45,代码来源:


注:本文中的CMusicInfoScanner::DownloadArtistInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。