本文整理汇总了C++中CAlbum::GetArtistIDArray方法的典型用法代码示例。如果您正苦于以下问题:C++ CAlbum::GetArtistIDArray方法的具体用法?C++ CAlbum::GetArtistIDArray怎么用?C++ CAlbum::GetArtistIDArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAlbum
的用法示例。
在下文中一共展示了CAlbum::GetArtistIDArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FillAlbumItem
void CAudioLibrary::FillAlbumItem(const CAlbum &album, const std::string &path, CFileItemPtr &item)
{
item = CFileItemPtr(new CFileItem(path, album));
// Add album artistIds as separate property as not part of CMusicInfoTag
std::vector<int> artistids = album.GetArtistIDArray();
FillItemArtistIDs(artistids, item);
}
示例2: FillFileItem
bool CAudioLibrary::FillFileItem(const std::string &strFilename, CFileItemPtr &item, const CVariant ¶meterObject /* = CVariant(CVariant::VariantTypeArray) */)
{
CMusicDatabase musicdatabase;
if (strFilename.empty())
return false;
bool filled = false;
if (musicdatabase.Open())
{
if (CDirectory::Exists(strFilename))
{
CAlbum album;
int albumid = musicdatabase.GetAlbumIdByPath(strFilename);
if (musicdatabase.GetAlbum(albumid, album, false))
{
item->SetFromAlbum(album);
FillItemArtistIDs(album.GetArtistIDArray(), item);
CFileItemList items;
items.Add(item);
if (GetAdditionalAlbumDetails(parameterObject, items, musicdatabase) == OK)
filled = true;
}
}
else
{
CSong song;
if (musicdatabase.GetSongByFileName(strFilename, song))
{
item->SetFromSong(song);
FillItemArtistIDs(song.GetArtistIDArray(), item);
CFileItemList items;
items.Add(item);
if (GetAdditionalSongDetails(parameterObject, items, musicdatabase) == OK)
filled = true;
}
}
}
if (item->GetLabel().empty())
{
item->SetLabel(CUtil::GetTitleFromPath(strFilename, false));
if (item->GetLabel().empty())
item->SetLabel(URIUtils::GetFileName(strFilename));
}
return filled;
}