infoviewer: fix progressbar (patch by Gauch316)

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-beta@1626 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: c05f64c116
Author: gixxpunk <thomas.harfmann@gmail.com>
Date: 2011-08-22 (Mon, 22 Aug 2011)



------------------
This commit was generated by Migit
This commit is contained in:
gixxpunk
2011-08-22 11:17:56 +00:00
parent 8a28328d09
commit ddeb6b3e03

View File

@@ -1690,11 +1690,11 @@ void CInfoViewer::show_Data (bool calledFromEvent)
time_t jetzt = time (NULL);
if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) {
int seit = (jetzt - info_CurrentNext.current_zeit.startzeit + 30) / 60;
int seit = (abs(jetzt - info_CurrentNext.current_zeit.startzeit) + 30) / 60;
int rest = (info_CurrentNext.current_zeit.dauer / 60) - seit;
if (seit < 0) {
if (jetzt < info_CurrentNext.current_zeit.startzeit) {
runningPercent = 0;
snprintf (runningRest, sizeof(runningRest), "in %d min", -seit);
snprintf (runningRest, sizeof(runningRest), "in %d min", seit);
} else {
runningPercent = (jetzt - info_CurrentNext.current_zeit.startzeit) * 100 / info_CurrentNext.current_zeit.dauer;
if (runningPercent > 100)