From f72980bf0b0e2b7318423a43daaadd0452744f70 Mon Sep 17 00:00:00 2001 From: Joakim Plate Date: Thu, 11 Oct 2012 00:32:01 +0200 Subject: gui: allow reporting of playback time for a non av player Shows info for a upnp remote player --- addons/skin.confluence/720p/includes.xml | 4 ++-- xbmc/GUIInfoManager.cpp | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/addons/skin.confluence/720p/includes.xml b/addons/skin.confluence/720p/includes.xml index 0d0b4e6d12..d886a0bd1c 100644 --- a/addons/skin.confluence/720p/includes.xml +++ b/addons/skin.confluence/720p/includes.xml @@ -588,7 +588,7 @@ blue center center - [Player.HasAudio | Player.HasVideo] + Player.HasMedia VisibleFadeEffect @@ -681,7 +681,7 @@ - [Player.HasAudio | Player.HasVideo] + Player.HasMedia !VideoPlayer.Content(LiveTV) VisibleFadeEffect 250 diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp index 5ea8eea88b..da66e07608 100644 --- a/xbmc/GUIInfoManager.cpp +++ b/xbmc/GUIInfoManager.cpp @@ -3476,7 +3476,7 @@ CStdString CGUIInfoManager::GetPlaylistLabel(int item) const CStdString CGUIInfoManager::GetMusicLabel(int item) { - if (!g_application.IsPlayingAudio() || !m_currentFile->HasMusicInfoTag()) return ""; + if (!g_application.IsPlaying() || !m_currentFile->HasMusicInfoTag()) return ""; switch (item) { case MUSICPLAYER_PLAYLISTLEN: @@ -3555,7 +3555,8 @@ CStdString CGUIInfoManager::GetMusicTagLabel(int info, const CFileItem *item) switch (info) { case MUSICPLAYER_TITLE: - return GetLabel(PLAYER_TITLE); + if(g_application.IsPlayingAudio()) + return GetLabel(PLAYER_TITLE); break; case MUSICPLAYER_ALBUM: if (tag.GetAlbum().size()) { return tag.GetAlbum(); } @@ -3628,12 +3629,13 @@ CStdString CGUIInfoManager::GetMusicTagLabel(int info, const CFileItem *item) CStdString CGUIInfoManager::GetVideoLabel(int item) { - if (!g_application.IsPlayingVideo()) + if (!g_application.IsPlaying()) return ""; if (item == VIDEOPLAYER_TITLE) { - return GetLabel(PLAYER_TITLE); + if(g_application.IsPlayingVideo()) + return GetLabel(PLAYER_TITLE); } else if (item == VIDEOPLAYER_PLAYLISTLEN) { @@ -3863,7 +3865,7 @@ CStdString CGUIInfoManager::GetCurrentPlayTime(TIME_FORMAT format) const { if (format == TIME_FORMAT_GUESS && GetTotalPlayTime() >= 3600) format = TIME_FORMAT_HH_MM_SS; - if (g_application.IsPlayingAudio() || g_application.IsPlayingVideo()) + if (g_application.IsPlaying()) return StringUtils::SecondsToTimeString((int)(GetPlayTime()/1000), format); return ""; } @@ -3893,7 +3895,7 @@ CStdString CGUIInfoManager::GetCurrentPlayTimeRemaining(TIME_FORMAT format) cons if (format == TIME_FORMAT_GUESS && GetTotalPlayTime() >= 3600) format = TIME_FORMAT_HH_MM_SS; int timeRemaining = GetPlayTimeRemaining(); - if (timeRemaining && (g_application.IsPlayingAudio() || g_application.IsPlayingVideo())) + if (timeRemaining && g_application.IsPlaying()) return StringUtils::SecondsToTimeString(timeRemaining, format); return ""; } -- cgit v1.2.3