projects
/
vuplus_xbmc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bdbe25d
)
fixed: track progress percentage for audio streams for which the player can't determi...
author
Martin van Beurden
<chadoe@xbmc.org>
Sun, 8 Jul 2012 17:54:40 +0000
(19:54 +0200)
committer
Martin van Beurden
<chadoe@xbmc.org>
Sun, 8 Jul 2012 20:10:01 +0000
(22:10 +0200)
xbmc/Application.cpp
patch
|
blob
|
history
diff --git
a/xbmc/Application.cpp
b/xbmc/Application.cpp
index
e837809
..
c9f9a0d
100644
(file)
--- a/
xbmc/Application.cpp
+++ b/
xbmc/Application.cpp
@@
-5409,6
+5409,13
@@
float CApplication::GetPercentage() const
{
if (IsPlaying() && m_pPlayer)
{
+ if (m_pPlayer->GetTotalTime() == 0 && IsPlayingAudio() && m_itemCurrentFile->HasMusicInfoTag())
+ {
+ const CMusicInfoTag& tag = *m_itemCurrentFile->GetMusicInfoTag();
+ if (tag.GetDuration() > 0)
+ return (float)(GetTime() / tag.GetDuration() * 100);
+ }
+
if (m_itemCurrentFile->IsStack() && m_currentStack->Size() > 0)
return (float)(GetTime() / GetTotalTime() * 100);
else