本文整理汇总了C++中CGUIDialogMusicInfo::HasUpdatedUserrating方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIDialogMusicInfo::HasUpdatedUserrating方法的具体用法?C++ CGUIDialogMusicInfo::HasUpdatedUserrating怎么用?C++ CGUIDialogMusicInfo::HasUpdatedUserrating使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIDialogMusicInfo
的用法示例。
在下文中一共展示了CGUIDialogMusicInfo::HasUpdatedUserrating方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ShowFor
void CGUIDialogMusicInfo::ShowFor(CFileItem* pItem)
{
if (pItem->IsParentFolder() || URIUtils::IsSpecial(pItem->GetPath()) ||
StringUtils::StartsWithNoCase(pItem->GetPath(), "musicsearch://"))
return; // nothing to do
if (!pItem->m_bIsFolder)
{ // Show Song information dialog
CGUIDialogSongInfo::ShowFor(pItem);
return;
}
// We have a folder album/artist info dialog only shown for db items
if (pItem->IsMusicDb())
{
if (!pItem->HasMusicInfoTag() || pItem->GetMusicInfoTag()->GetDatabaseId() < 1)
{
// Maybe only path is set, then set MusicInfoTag
CQueryParams params;
CDirectoryNode::GetDatabaseInfo(pItem->GetPath(), params);
if (params.GetAlbumId() == -1)
pItem->GetMusicInfoTag()->SetDatabaseId(params.GetArtistId(), MediaTypeArtist);
else
pItem->GetMusicInfoTag()->SetDatabaseId(params.GetAlbumId(), MediaTypeAlbum);
}
CGUIDialogMusicInfo *pDlgMusicInfo = CServiceBroker::GetGUI()->GetWindowManager().
GetWindow<CGUIDialogMusicInfo>(WINDOW_DIALOG_MUSIC_INFO);
if (pDlgMusicInfo)
{
if (pDlgMusicInfo->SetItem(pItem))
{
pDlgMusicInfo->Open();
if (pItem->GetMusicInfoTag()->GetType() == MediaTypeAlbum &&
pDlgMusicInfo->HasUpdatedUserrating())
{
auto window = CServiceBroker::GetGUI()->GetWindowManager().GetWindow<CGUIWindowMusicBase>(WINDOW_MUSIC_NAV);
if (window)
window->RefreshContent("albums");
}
}
}
}
}