void Player::seekTime(double pTime) { XBMC_TRACE; if (!g_application.m_pPlayer->IsPlaying()) throw PlayerException("XBMC is not playing any media file"); g_application.SeekTime( pTime ); }
String Player::getPlayingFile() { XBMC_TRACE; if (!g_application.m_pPlayer->IsPlaying()) throw PlayerException("XBMC is not playing any file"); return g_application.CurrentFile(); }
double Player::getTime() { XBMC_TRACE; if (!g_application.m_pPlayer->IsPlaying()) throw PlayerException("XBMC is not playing any media file"); return g_application.GetTime(); }
String Player::getPlayingFile() { XBMC_TRACE; if (!g_application.GetAppPlayer().IsPlaying()) throw PlayerException("XBMC is not playing any file"); return g_application.CurrentFileItem().GetDynPath(); }
double Player::getTotalTime() throw (PlayerException) { TRACE; if (!g_application.IsPlaying()) throw PlayerException("XBMC is not playing any media file"); return g_application.GetTotalTime(); }
void Player::updateInfoTag(const XBMCAddon::xbmcgui::ListItem* item) { XBMC_TRACE; if (!g_application.GetAppPlayer().IsPlaying()) throw PlayerException("Kodi is not playing any file"); CGUIMessage msg(GUI_MSG_NOTIFY_ALL, 0, 0, GUI_MSG_UPDATE_ITEM, 0, item->item); g_windowManager.SendMessage(msg); }
InfoTagMusic* Player::getMusicInfoTag() { XBMC_TRACE; if (g_application.m_pPlayer->IsPlayingVideo() || !g_application.m_pPlayer->IsPlayingAudio()) throw PlayerException("XBMC is not playing any music file"); const MUSIC_INFO::CMusicInfoTag* tag = g_infoManager.GetCurrentSongTag(); if (tag) return new InfoTagMusic(*tag); return new InfoTagMusic(); }
InfoTagVideo* Player::getVideoInfoTag() { XBMC_TRACE; if (!g_application.m_pPlayer->IsPlayingVideo()) throw PlayerException("XBMC is not playing any videofile"); const CVideoInfoTag* movie = g_infoManager.GetCurrentMovieTag(); if (movie) return new InfoTagVideo(*movie); return new InfoTagVideo(); }
InfoTagRadioRDS* Player::getRadioRDSInfoTag() throw (PlayerException) { XBMC_TRACE; if (g_application.GetAppPlayer().IsPlayingVideo() || !g_application.GetAppPlayer().IsPlayingRDS()) throw PlayerException("XBMC is not playing any music file with RDS"); const PVR::CPVRRadioRDSInfoTagPtr tag = g_infoManager.GetCurrentRadioRDSInfoTag(); if (tag) return new InfoTagRadioRDS(tag); return new InfoTagRadioRDS(); }
InfoTagRadioRDS* Player::getRadioRDSInfoTag() { XBMC_TRACE; if (g_application.GetAppPlayer().IsPlayingVideo() || !g_application.GetAppPlayer().IsPlayingRDS()) throw PlayerException("Kodi is not playing any music file with RDS"); std::shared_ptr<CFileItem> item = g_application.CurrentFileItemPtr(); if (item && item->HasPVRRadioRDSInfoTag()) return new InfoTagRadioRDS(item->GetPVRRadioRDSInfoTag()); return new InfoTagRadioRDS(); }
InfoTagMusic* Player::getMusicInfoTag() { XBMC_TRACE; if (g_application.GetAppPlayer().IsPlayingVideo() || !g_application.GetAppPlayer().IsPlayingAudio()) throw PlayerException("XBMC is not playing any music file"); const MUSIC_INFO::CMusicInfoTag* tag = CServiceBroker::GetGUI()->GetInfoManager().GetCurrentSongTag(); if (tag) return new InfoTagMusic(*tag); return new InfoTagMusic(); }
InfoTagVideo* Player::getVideoInfoTag() { XBMC_TRACE; if (!g_application.GetAppPlayer().IsPlayingVideo()) throw PlayerException("XBMC is not playing any videofile"); const CVideoInfoTag* movie = CServiceBroker::GetGUI()->GetInfoManager().GetCurrentMovieTag(); if (movie) return new InfoTagVideo(*movie); return new InfoTagVideo(); }