本文整理汇总了C++中CCdInfo::IsCDExtra方法的典型用法代码示例。如果您正苦于以下问题:C++ CCdInfo::IsCDExtra方法的具体用法?C++ CCdInfo::IsCDExtra怎么用?C++ CCdInfo::IsCDExtra使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCdInfo
的用法示例。
在下文中一共展示了CCdInfo::IsCDExtra方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetContextButtons
void CGUIWindowMusicSongs::GetContextButtons(int itemNumber, CContextButtons &buttons)
{
CFileItemPtr item;
if (itemNumber >= 0 && itemNumber < m_vecItems->Size())
item = m_vecItems->Get(itemNumber);
if (item)
{
// are we in the playlists location?
bool inPlaylists = m_vecItems->GetPath().Equals(CUtil::MusicPlaylistsLocation()) ||
m_vecItems->GetPath().Equals("special://musicplaylists/");
if (m_vecItems->IsVirtualDirectoryRoot() || m_vecItems->GetPath() == "sources://music/")
{
// get the usual music shares, and anything for all media windows
CGUIDialogContextMenu::GetContextButtons("music", item, buttons);
#ifdef HAS_DVD_DRIVE
// enable Rip CD an audio disc
if (g_mediaManager.IsDiscInDrive() && item->IsCDDA())
{
// those cds can also include Audio Tracks: CDExtra and MixedMode!
CCdInfo *pCdInfo = g_mediaManager.GetCdInfo();
if (pCdInfo->IsAudio(1) || pCdInfo->IsCDExtra(1) || pCdInfo->IsMixedMode(1))
{
if (CJobManager::GetInstance().IsProcessing("cdrip"))
buttons.Add(CONTEXT_BUTTON_CANCEL_RIP_CD, 14100);
else
buttons.Add(CONTEXT_BUTTON_RIP_CD, 600);
}
}
#endif
CGUIMediaWindow::GetContextButtons(itemNumber, buttons);
}
else
{
CGUIWindowMusicBase::GetContextButtons(itemNumber, buttons);
if (item->GetProperty("pluginreplacecontextitems").asBoolean())
return;
if (!item->IsPlayList() && !item->IsPlugin() && !item->IsScript())
{
if (item->IsAudio())
buttons.Add(CONTEXT_BUTTON_SONG_INFO, 658); // Song Info
else if (!item->IsParentFolder() &&
!StringUtils::StartsWithNoCase(item->GetPath(), "new") && item->m_bIsFolder)
{
#if 0
if (m_musicdatabase.GetAlbumIdByPath(item->GetPath()) > -1)
#endif
buttons.Add(CONTEXT_BUTTON_INFO, 13351); // Album Info
}
}
#ifdef HAS_DVD_DRIVE
// enable Rip CD Audio or Track button if we have an audio disc
if (g_mediaManager.IsDiscInDrive() && m_vecItems->IsCDDA())
{
// those cds can also include Audio Tracks: CDExtra and MixedMode!
CCdInfo *pCdInfo = g_mediaManager.GetCdInfo();
if (pCdInfo->IsAudio(1) || pCdInfo->IsCDExtra(1) || pCdInfo->IsMixedMode(1))
buttons.Add(CONTEXT_BUTTON_RIP_TRACK, 610);
}
#endif
// enable CDDB lookup if the current dir is CDDA
if (g_mediaManager.IsDiscInDrive() && m_vecItems->IsCDDA() &&
(CProfilesManager::Get().GetCurrentProfile().canWriteDatabases() || g_passwordManager.bMasterUser))
{
buttons.Add(CONTEXT_BUTTON_CDDB, 16002);
}
if (!item->IsParentFolder() && !item->IsReadOnly())
{
// either we're at the playlist location or its been explicitly allowed
if (inPlaylists || CSettings::Get().GetBool("filelists.allowfiledeletion"))
{
buttons.Add(CONTEXT_BUTTON_DELETE, 117);
buttons.Add(CONTEXT_BUTTON_RENAME, 118);
}
}
}
// Add the scan button(s)
if (g_application.IsMusicScanning())
buttons.Add(CONTEXT_BUTTON_STOP_SCANNING, 13353); // Stop Scanning
else if (!inPlaylists && !m_vecItems->IsInternetStream() &&
!item->GetPath().Equals("add") && !item->IsParentFolder() &&
!item->IsPlugin() &&
!StringUtils::StartsWithNoCase(item->GetPath(), "addons://") &&
(CProfilesManager::Get().GetCurrentProfile().canWriteDatabases() || g_passwordManager.bMasterUser))
{
buttons.Add(CONTEXT_BUTTON_SCAN, 13352);
}
if (item->IsPlugin() || item->IsScript() || m_vecItems->IsPlugin())
buttons.Add(CONTEXT_BUTTON_PLUGIN_SETTINGS, 1045);
}
if (!m_vecItems->IsVirtualDirectoryRoot() && !m_vecItems->IsPlugin())
buttons.Add(CONTEXT_BUTTON_SWITCH_MEDIA, 523);
CGUIWindowMusicBase::GetNonContextButtons(buttons);
}
示例2: GetContextButtons
void CGUIWindowMusicSongs::GetContextButtons(int itemNumber, CContextButtons &buttons)
{
CFileItemPtr item;
if (itemNumber >= 0 && itemNumber < m_vecItems->Size())
item = m_vecItems->Get(itemNumber);
if (item)
{
// are we in the playlists location?
bool inPlaylists = m_vecItems->m_strPath.Equals(CUtil::MusicPlaylistsLocation()) ||
m_vecItems->m_strPath.Equals("special://musicplaylists/");
if (m_vecItems->IsVirtualDirectoryRoot())
{
// get the usual music shares, and anything for all media windows
CGUIDialogContextMenu::GetContextButtons("music", item, buttons);
// enable Rip CD an audio disc
if (CDetectDVDMedia::IsDiscInDrive() && item->IsCDDA())
{
// those cds can also include Audio Tracks: CDExtra and MixedMode!
CCdInfo *pCdInfo = CDetectDVDMedia::GetCdInfo();
if (pCdInfo->IsAudio(1) || pCdInfo->IsCDExtra(1) || pCdInfo->IsMixedMode(1))
buttons.Add(CONTEXT_BUTTON_RIP_CD, 600);
}
CGUIMediaWindow::GetContextButtons(itemNumber, buttons);
}
else
{
CGUIWindowMusicBase::GetContextButtons(itemNumber, buttons);
if (item->GetPropertyBOOL("pluginreplacecontextitems"))
return;
if (!item->IsPlayList())
{
if (item->IsAudio() && !item->IsLastFM() && !item->IsShoutCast())
buttons.Add(CONTEXT_BUTTON_SONG_INFO, 658); // Song Info
else if (!item->IsParentFolder() && !item->IsLastFM() && !item->IsShoutCast() &&
!item->m_strPath.Left(3).Equals("new") && item->m_bIsFolder)
{
#if 0
if (m_musicdatabase.GetAlbumIdByPath(item->m_strPath) > -1)
#endif
buttons.Add(CONTEXT_BUTTON_INFO, 13351); // Album Info
}
}
// enable Rip CD Audio or Track button if we have an audio disc
if (CDetectDVDMedia::IsDiscInDrive() && m_vecItems->IsCDDA())
{
// those cds can also include Audio Tracks: CDExtra and MixedMode!
CCdInfo *pCdInfo = CDetectDVDMedia::GetCdInfo();
if (pCdInfo->IsAudio(1) || pCdInfo->IsCDExtra(1) || pCdInfo->IsMixedMode(1))
buttons.Add(CONTEXT_BUTTON_RIP_TRACK, 610);
}
// enable CDDB lookup if the current dir is CDDA
if (CDetectDVDMedia::IsDiscInDrive() && m_vecItems->IsCDDA() &&
(g_settings.m_vecProfiles[g_settings.m_iLastLoadedProfileIndex].canWriteDatabases() || g_passwordManager.bMasterUser))
{
buttons.Add(CONTEXT_BUTTON_CDDB, 16002);
}
if (!item->IsParentFolder() && !item->IsReadOnly())
{
// either we're at the playlist location or its been explicitly allowed
if (inPlaylists || g_guiSettings.GetBool("filelists.allowfiledeletion"))
{
buttons.Add(CONTEXT_BUTTON_DELETE, 117);
buttons.Add(CONTEXT_BUTTON_RENAME, 118);
}
}
}
// Add the scan button(s)
CGUIDialogMusicScan *pScanDlg = (CGUIDialogMusicScan *)m_gWindowManager.GetWindow(WINDOW_DIALOG_MUSIC_SCAN);
if (g_guiSettings.GetBool("musiclibrary.enabled") && pScanDlg)
{
if (pScanDlg->IsScanning())
buttons.Add(CONTEXT_BUTTON_STOP_SCANNING, 13353); // Stop Scanning
else if (!inPlaylists && !m_vecItems->IsInternetStream() &&
!item->IsLastFM() && !item->IsShoutCast() &&
!item->m_strPath.Equals("add") && !item->IsParentFolder() &&
(g_settings.m_vecProfiles[g_settings.m_iLastLoadedProfileIndex].canWriteDatabases() || g_passwordManager.bMasterUser))
{
buttons.Add(CONTEXT_BUTTON_SCAN, 13352);
}
}
}
if (!m_vecItems->IsVirtualDirectoryRoot())
buttons.Add(CONTEXT_BUTTON_SWITCH_MEDIA, 523);
CGUIWindowMusicBase::GetNonContextButtons(buttons);
}