infoviewer: only show remaining time if time is set

Origin commit data
------------------
Branch: ni/coolstream
Commit: b8cf78a490
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-03-25 (Sun, 25 Mar 2012)


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

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2012-03-25 20:14:26 +02:00
parent c0981d0765
commit 8b82d1a5cf

View File

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