aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoakim Plate <elupus@ecce.se>2012-10-11 00:32:01 +0200
committerJoakim Plate <elupus@ecce.se>2013-01-20 18:25:31 +0100
commitf72980bf0b0e2b7318423a43daaadd0452744f70 (patch)
tree87421ee1820fef6320faf95bdae8b514a0034aca
parent05a8c6ad641ae2b0bb82520b5decd36ea19fc718 (diff)
gui: allow reporting of playback time for a non av player
Shows info for a upnp remote player
-rw-r--r--addons/skin.confluence/720p/includes.xml4
-rw-r--r--xbmc/GUIInfoManager.cpp14
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 @@
<textcolor>blue</textcolor>
<align>center</align>
<aligny>center</aligny>
- <visible>[Player.HasAudio | Player.HasVideo]</visible>
+ <visible>Player.HasMedia</visible>
<include>VisibleFadeEffect</include>
</control>
<control type="button" id="610">
@@ -681,7 +681,7 @@
</control>
</control>
<control type="group" id="9005">
- <visible>[Player.HasAudio | Player.HasVideo]</visible>
+ <visible>Player.HasMedia</visible>
<visible>!VideoPlayer.Content(LiveTV)</visible>
<include>VisibleFadeEffect</include>
<width>250</width>
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 "";
}