本文整理汇总了C++中CAlbum::GetAlbumArtist方法的典型用法代码示例。如果您正苦于以下问题:C++ CAlbum::GetAlbumArtist方法的具体用法?C++ CAlbum::GetAlbumArtist怎么用?C++ CAlbum::GetAlbumArtist使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAlbum
的用法示例。
在下文中一共展示了CAlbum::GetAlbumArtist方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetAlbum
void CMusicInfoTag::SetAlbum(const CAlbum& album)
{
Clear();
//Set all artist infomation from album artist credits and artist description
SetArtistDesc(album.GetAlbumArtistString());
SetArtist(album.GetAlbumArtist());
SetMusicBrainzArtistID(album.GetMusicBrainzAlbumArtistID());
SetAlbumArtistDesc(album.GetAlbumArtistString());
SetAlbumArtist(album.GetAlbumArtist());
SetMusicBrainzAlbumArtistID(album.GetMusicBrainzAlbumArtistID());
SetAlbumId(album.idAlbum);
SetAlbum(album.strAlbum);
SetTitle(album.strAlbum);
SetMusicBrainzAlbumID(album.strMusicBrainzAlbumID);
SetMusicBrainzReleaseType(album.strType);
SetGenre(album.genre);
SetMood(StringUtils::Join(album.moods, g_advancedSettings.m_musicItemSeparator));
SetRecordLabel(album.strLabel);
SetRating(album.fRating);
SetUserrating(album.iUserrating);
SetVotes(album.iVotes);
SetCompilation(album.bCompilation);
SYSTEMTIME stTime;
stTime.wYear = album.iYear;
SetReleaseDate(stTime);
SetAlbumReleaseType(album.releaseType);
SetDateAdded(album.dateAdded);
SetPlayCount(album.iTimesPlayed);
SetDatabaseId(album.idAlbum, MediaTypeAlbum);
SetLastPlayed(album.lastPlayed);
SetLoaded();
}
示例2: UpdateThumb
void CGUIWindowMusicBase::UpdateThumb(const CAlbum &album, const std::string &path)
{
// check user permissions
bool saveDb = album.idAlbum != -1;
bool saveDirThumb = true;
if (!CProfilesManager::GetInstance().GetCurrentProfile().canWriteDatabases() && !g_passwordManager.bMasterUser)
{
saveDb = false;
saveDirThumb = false;
}
std::string albumThumb = m_musicdatabase.GetArtForItem(album.idAlbum, MediaTypeAlbum, "thumb");
// Update the thumb in the music database (songs + albums)
std::string albumPath(path);
if (saveDb && CFile::Exists(albumThumb))
m_musicdatabase.SaveAlbumThumb(album.idAlbum, albumThumb);
// Update currently playing song if it's from the same album. This is necessary as when the album
// first gets it's cover, the info manager's item doesn't have the updated information (so will be
// sending a blank thumb to the skin.)
if (g_application.m_pPlayer->IsPlayingAudio())
{
const CMusicInfoTag* tag=g_infoManager.GetCurrentSongTag();
if (tag)
{
// really, this may not be enough as it is to reliably update this item. eg think of various artists albums
// that aren't tagged as such (and aren't yet scanned). But we probably can't do anything better than this
// in that case
if (album.strAlbum == tag->GetAlbum() && (album.GetAlbumArtist() == tag->GetAlbumArtist() ||
album.GetAlbumArtist() == tag->GetArtist()))
{
g_infoManager.SetCurrentAlbumThumb(albumThumb);
}
}
}
// Save this thumb as the directory thumb if it's the only album in the folder (files view nicety)
// We do this by grabbing all the songs in the folder, and checking to see whether they come
// from the same album.
if (saveDirThumb && CFile::Exists(albumThumb) && !albumPath.empty() && !URIUtils::IsCDDA(albumPath))
{
CFileItemList items;
GetDirectory(albumPath, items);
OnRetrieveMusicInfo(items);
VECALBUMS albums;
CMusicInfoScanner::FileItemsToAlbums(items, albums);
if (albums.size() == 1)
{ // set as folder thumb as well
CMusicThumbLoader loader;
loader.SetCachedImage(items, "thumb", albumPath);
}
}
// update the file listing - we have to update the whole lot, as it's likely that
// more than just our thumbnails changed
//! @todo Ideally this would only be done when needed - at the moment we appear to be
//! doing this for every lookup, possibly twice (see ShowAlbumInfo)
Refresh(true);
// Do we have to autoswitch to the thumb control?
m_guiState.reset(CGUIViewState::GetViewState(GetID(), *m_vecItems));
UpdateButtons();
}