本文整理汇总了C++中CVideoThumbLoader::FillLibraryArt方法的典型用法代码示例。如果您正苦于以下问题:C++ CVideoThumbLoader::FillLibraryArt方法的具体用法?C++ CVideoThumbLoader::FillLibraryArt怎么用?C++ CVideoThumbLoader::FillLibraryArt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CVideoThumbLoader
的用法示例。
在下文中一共展示了CVideoThumbLoader::FillLibraryArt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FillDetails
void CFileItemHandler::FillDetails(ISerializable* info, CFileItemPtr item, const CVariant& fields, CVariant &result)
{
if (info == NULL || fields.size() == 0)
return;
CVariant serialization;
info->Serialize(serialization);
bool fetchedArt = false;
for (unsigned int i = 0; i < fields.size(); i++)
{
CStdString field = fields[i].asString();
if (item)
{
if (item->IsAlbum() && field.Equals("albumlabel"))
field = "label";
if (item->IsAlbum())
{
if (field == "label")
{
result["albumlabel"] = item->GetProperty("album_label");
continue;
}
if (item->HasProperty("album_" + field + "_array"))
{
result[field] = item->GetProperty("album_" + field + "_array");
continue;
}
if (item->HasProperty("album_" + field))
{
result[field] = item->GetProperty("album_" + field);
continue;
}
}
if (item->HasProperty("artist_" + field + "_array"))
{
result[field] = item->GetProperty("artist_" + field + "_array");
continue;
}
if (item->HasProperty("artist_" + field))
{
result[field] = item->GetProperty("artist_" + field);
continue;
}
if (field == "thumbnail")
{
if (item->HasVideoInfoTag())
{
if (!item->HasThumbnail() && !fetchedArt && item->GetVideoInfoTag()->m_iDbId > -1)
{
CVideoThumbLoader loader;
loader.FillLibraryArt(item.get());
fetchedArt = true;
}
}
else if (item->HasPictureInfoTag())
{
if (!item->HasThumbnail())
item->SetThumbnailImage(CTextureCache::GetWrappedThumbURL(item->GetPath()));
}
else if (item->HasMusicInfoTag())
{
if (!item->HasThumbnail() && !fetchedArt && item->GetMusicInfoTag()->GetDatabaseId() > -1)
{
CMusicThumbLoader loader;
loader.FillLibraryArt(*item);
fetchedArt = true;
}
}
if (item->HasThumbnail())
result["thumbnail"] = CTextureCache::GetWrappedImageURL(item->GetThumbnailImage());
if (!result.isMember("thumbnail"))
result["thumbnail"] = "";
continue;
}
if (field == "fanart")
{
if (item->HasVideoInfoTag())
{
if (!item->HasProperty("fanart_image") && !fetchedArt && item->GetVideoInfoTag()->m_iDbId > -1)
{
CVideoThumbLoader loader;
loader.FillLibraryArt(item.get());
fetchedArt = true;
}
if (item->HasProperty("fanart_image"))
result["fanart"] = CTextureCache::GetWrappedImageURL(item->GetProperty("fanart_image").asString());
}
else if (item->HasMusicInfoTag())
{
if (!item->HasProperty("fanart_image") && !fetchedArt && item->GetMusicInfoTag()->GetDatabaseId() > -1)
{
CMusicThumbLoader loader;
loader.FillLibraryArt(*item);
fetchedArt = true;
//.........这里部分代码省略.........