Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

gui: allow reporting of playback time for a non av player

Shows info for a upnp remote player
  • Loading branch information...
commit 69a69f0b7adcdb80727fc68e4b84fcdae2445dd0 1 parent 4bdab57
@elupus authored
View
4 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>
View
14 xbmc/GUIInfoManager.cpp
@@ -3475,7 +3475,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:
@@ -3554,7 +3554,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(); }
@@ -3627,12 +3628,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)
{
@@ -3862,7 +3864,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 "";
}
@@ -3892,7 +3894,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 "";
}
Please sign in to comment.
Something went wrong with that request. Please try again.