mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +02:00
- channellist/infoviewer: align calculations for "since-time" of current event
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -1554,7 +1554,7 @@ void CChannelList::paintDetails(int index)
|
|||||||
char cSeit[50] = {0}; // UTF-8
|
char cSeit[50] = {0}; // UTF-8
|
||||||
|
|
||||||
struct tm *pStartZeit = localtime(&p_event->startTime);
|
struct tm *pStartZeit = localtime(&p_event->startTime);
|
||||||
unsigned seit = ( time(NULL) - p_event->startTime ) / 60;
|
unsigned seit = (time(NULL) - p_event->startTime + 30) / 60;
|
||||||
snprintf(cSeit, sizeof(cSeit), "%s %02d:%02d",(displayNext) ? g_Locale->getText(LOCALE_CHANNELLIST_START):g_Locale->getText(LOCALE_CHANNELLIST_SINCE), pStartZeit->tm_hour, pStartZeit->tm_min);
|
snprintf(cSeit, sizeof(cSeit), "%s %02d:%02d",(displayNext) ? g_Locale->getText(LOCALE_CHANNELLIST_START):g_Locale->getText(LOCALE_CHANNELLIST_SINCE), pStartZeit->tm_hour, pStartZeit->tm_min);
|
||||||
if (displayNext) {
|
if (displayNext) {
|
||||||
snprintf(cNoch, sizeof(cNoch), "(%d %s)", p_event->duration / 60, unit_short_minute);
|
snprintf(cNoch, sizeof(cNoch), "(%d %s)", p_event->duration / 60, unit_short_minute);
|
||||||
|
@@ -1885,7 +1885,7 @@ void CInfoViewer::show_Data (bool calledFromEvent)
|
|||||||
const char *unit_short_minute = g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE);
|
const char *unit_short_minute = g_Locale->getText(LOCALE_UNIT_SHORT_MINUTE);
|
||||||
|
|
||||||
if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) {
|
if (info_CurrentNext.flags & CSectionsdClient::epgflags::has_current) {
|
||||||
int seit = (abs(jetzt - info_CurrentNext.current_zeit.startzeit) + 30) / 60;
|
unsigned seit = (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;
|
||||||
runningPercent = 0;
|
runningPercent = 0;
|
||||||
if (!timeset)
|
if (!timeset)
|
||||||
|
Reference in New Issue
Block a user