本文整理汇总了C++中CFileItemPtr::IsInternetStream方法的典型用法代码示例。如果您正苦于以下问题:C++ CFileItemPtr::IsInternetStream方法的具体用法?C++ CFileItemPtr::IsInternetStream怎么用?C++ CFileItemPtr::IsInternetStream使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFileItemPtr
的用法示例。
在下文中一共展示了CFileItemPtr::IsInternetStream方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnPlayMedia
bool CGUIWindowMusicBase::OnPlayMedia(int iItem, const std::string &player)
{
CFileItemPtr pItem = m_vecItems->Get(iItem);
// party mode
if (g_partyModeManager.IsEnabled())
{
CPlayList playlistTemp;
playlistTemp.Add(pItem);
g_partyModeManager.AddUserSongs(playlistTemp, true);
return true;
}
else if (!pItem->IsPlayList() && !pItem->IsInternetStream())
{ // single music file - if we get here then we have autoplaynextitem turned off or queuebydefault
// turned on, but we still want to use the playlist player in order to handle more queued items
// following etc.
if ( (CServiceBroker::GetSettings().GetBool(CSettings::SETTING_MUSICPLAYER_QUEUEBYDEFAULT) && g_windowManager.GetActiveWindow() != WINDOW_MUSIC_PLAYLIST_EDITOR) )
{
//! @todo Should the playlist be cleared if nothing is already playing?
OnQueueItem(iItem);
return true;
}
CServiceBroker::GetPlaylistPlayer().Play(pItem, player);
return true;
}
return CGUIMediaWindow::OnPlayMedia(iItem, player);
}
示例2: OnLoaderFinish
void CMusicInfoLoader::OnLoaderFinish()
{
// cleanup last loaded songs from database
m_songsMap.Clear();
// cleanup cache loaded from HD
m_mapFileItems->Clear();
if (!m_bStop)
{ // check for art
VECSONGS songs;
songs.reserve(m_pVecItems->Size());
for (int i = 0; i < m_pVecItems->Size(); ++i)
{
CFileItemPtr pItem = m_pVecItems->Get(i);
if (pItem->m_bIsFolder || pItem->IsPlayList() || pItem->IsNFO() || pItem->IsInternetStream())
continue;
if (pItem->HasMusicInfoTag() && pItem->GetMusicInfoTag()->Loaded())
{
CSong song(*pItem->GetMusicInfoTag());
song.strThumb = pItem->GetArt("thumb");
song.idSong = i; // for the lookup below
songs.push_back(song);
}
}
VECALBUMS albums;
CMusicInfoScanner::CategoriseAlbums(songs, albums);
CMusicInfoScanner::FindArtForAlbums(albums, m_pVecItems->GetPath());
for (VECALBUMS::iterator i = albums.begin(); i != albums.end(); ++i)
{
string albumArt = i->art["thumb"];
for (VECSONGS::iterator j = i->songs.begin(); j != i->songs.end(); ++j)
{
if (!j->strThumb.empty())
m_pVecItems->Get(j->idSong)->SetArt("thumb", j->strThumb);
else
m_pVecItems->Get(j->idSong)->SetArt("thumb", albumArt);
}
}
}
// Save loaded items to HD
if (!m_strCacheFileName.IsEmpty())
SaveCache(m_strCacheFileName, *m_pVecItems);
else if (!m_bStop && (m_databaseHits > 1 || m_tagReads > 0))
m_pVecItems->Save();
m_musicDatabase.Close();
}
示例3: OnPlayMedia
bool CGUIWindowMusicBase::OnPlayMedia(int iItem)
{
CFileItemPtr pItem = m_vecItems->Get(iItem);
if (pItem->m_strPath == "add" && pItem->GetLabel() == g_localizeStrings.Get(1026)) // 'add source button' in empty root
{
if (CGUIDialogMediaSource::ShowAndAddMediaSource("music"))
{
Update("");
return true;
}
return false;
}
// party mode
#ifndef _BOXEE_
if (g_partyModeManager.IsEnabled() && !pItem->IsLastFM())
{
CPlayList playlistTemp;
playlistTemp.Add(pItem);
g_partyModeManager.AddUserSongs(playlistTemp, true);
return true;
}
else
#endif
if (!pItem->IsPlayList() && !pItem->IsInternetStream())
{ // single music file - if we get here then we have autoplaynextitem turned off, but we
// still want to use the playlist player in order to handle more queued items following etc.
g_playlistPlayer.Reset();
g_playlistPlayer.ClearPlaylist(PLAYLIST_MUSIC);
g_playlistPlayer.Add(PLAYLIST_MUSIC, pItem);
g_playlistPlayer.SetCurrentPlaylist(PLAYLIST_MUSIC);
g_playlistPlayer.Play();
return true;
}
return CGUIMediaWindow::OnPlayMedia(iItem);
}