mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
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
This commit is contained in:
@@ -1690,11 +1690,11 @@ void CInfoViewer::show_Data (bool calledFromEvent)
|
|||||||
time_t jetzt = time (NULL);
|
time_t jetzt = time (NULL);
|
||||||
|
|
||||||
if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) {
|
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;
|
int rest = (info_CurrentNext.current_zeit.dauer / 60) - seit;
|
||||||
if (seit < 0) {
|
if (jetzt < info_CurrentNext.current_zeit.startzeit) {
|
||||||
runningPercent = 0;
|
runningPercent = 0;
|
||||||
snprintf (runningRest, sizeof(runningRest), "in %d min", -seit);
|
snprintf (runningRest, sizeof(runningRest), "in %d min", seit);
|
||||||
} else {
|
} else {
|
||||||
runningPercent = (jetzt - info_CurrentNext.current_zeit.startzeit) * 100 / info_CurrentNext.current_zeit.dauer;
|
runningPercent = (jetzt - info_CurrentNext.current_zeit.startzeit) * 100 / info_CurrentNext.current_zeit.dauer;
|
||||||
if (runningPercent > 100)
|
if (runningPercent > 100)
|
||||||
|
Reference in New Issue
Block a user