audioplayer: don't show not recognized bitrates

Origin commit data
------------------
Branch: ni/coolstream
Commit: 9fefb133d9
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-18 (Sun, 18 Jun 2017)

Origin message was:
------------------
- audioplayer: don't show not recognized bitrates

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-06-18 23:54:43 +02:00
parent a70843710e
commit 393ded6d49

View File

@@ -1613,9 +1613,12 @@ void CAudioPlayerGui::paintItem(int pos)
std::string tmp = sNr; std::string tmp = sNr;
getFileInfoToDisplay(tmp, m_playlist[currpos]); getFileInfoToDisplay(tmp, m_playlist[currpos]);
char dura[9]; char dura[9] = {0};
if (m_inetmode) if (m_inetmode)
{
if (m_playlist[currpos].MetaData.total_time != 0)
snprintf(dura, 8, "%ldk", m_playlist[currpos].MetaData.total_time); snprintf(dura, 8, "%ldk", m_playlist[currpos].MetaData.total_time);
}
else else
snprintf(dura, 8, "%ld:%02ld", m_playlist[currpos].MetaData.total_time / 60, m_playlist[currpos].MetaData.total_time % 60); snprintf(dura, 8, "%ld:%02ld", m_playlist[currpos].MetaData.total_time / 60, m_playlist[currpos].MetaData.total_time % 60);