fix some timout-off-bugs in epgplus, epgview, eventlist and filebrowser

Origin commit data
------------------
Branch: ni/coolstream
Commit: 5b8f7b86bf
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-09-27 (Wed, 27 Sep 2017)

Origin message was:
------------------
- fix some timout-off-bugs in epgplus, epgview, eventlist and filebrowser

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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-09-27 08:53:13 +02:00
parent fced13d10f
commit 2bcb920dae
4 changed files with 28 additions and 22 deletions

View File

@@ -934,14 +934,15 @@ int EpgPlus::exec(CChannelList * pchannelList, int selectedChannelIndex, CBouque
this->paint(); this->paint();
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]); int timeout = g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST];
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
bool loop = true; bool loop = true;
while (loop) while (loop)
{ {
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd); g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd);
if (msg <= CRCInput::RC_MaxRC) if (msg <= CRCInput::RC_MaxRC)
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_CHANLIST]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
if ((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer())) if ((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer()))

View File

@@ -938,13 +938,15 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
bool loop = true; bool loop = true;
bool epgTextSwitchClear = true; bool epgTextSwitchClear = true;
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]);
int timeout = g_settings.timing[SNeutrinoSettings::TIMING_EPG];
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
while (loop) while (loop)
{ {
g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd ); g_RCInput->getMsgAbsoluteTimeout( &msg, &data, &timeoutEnd );
if ( msg <= CRCInput::RC_MaxRC ) if ( msg <= CRCInput::RC_MaxRC )
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
scrollCount = medlinecount; scrollCount = medlinecount;
@@ -1095,7 +1097,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
bigFonts = g_settings.bigFonts; bigFonts = g_settings.bigFonts;
show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false); show(channel_id,epgData.eventID,&epgData.epg_times.startzeit,false);
showPos=0; showPos=0;
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} else } else
{ {
printf("no network devices available\n"); printf("no network devices available\n");
@@ -1126,7 +1128,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
epgData.epg_times.startzeit + epgData.epg_times.dauer, epgData.epg_times.startzeit + epgData.epg_times.dauer,
epgData.title, epgData.eventID, TIMERD_APIDS_CONF, true, recDir, &evtlist); epgData.title, epgData.eventID, TIMERD_APIDS_CONF, true, recDir, &evtlist);
m.exec(NULL, ""); m.exec(NULL, "");
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} }
else if (doRecord) else if (doRecord)
{ {
@@ -1147,11 +1149,11 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
epgData.epg_times.startzeit - (ANNOUNCETIME + 120 ), epgData.epg_times.startzeit - (ANNOUNCETIME + 120 ),
TIMERD_APIDS_CONF, true, epgData.epg_times.startzeit - (ANNOUNCETIME + 120) > time(NULL), recDir, true); TIMERD_APIDS_CONF, true, epgData.epg_times.startzeit - (ANNOUNCETIME + 120) > time(NULL), recDir, true);
ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG, CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO); ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG, CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO);
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} }
} else { } else {
ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG, CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO); ShowMsg(LOCALE_TIMER_EVENTRECORD_TITLE, LOCALE_TIMER_EVENTRECORD_MSG, CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO);
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} }
} }
} }
@@ -1216,7 +1218,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
imdb->getIMDb(epgData.title); imdb->getIMDb(epgData.title);
showIMDb(); showIMDb();
showTimerEventBar(true, !mp_info && isCurrentEPG(channel_id), mp_info); //show buttons showTimerEventBar(true, !mp_info && isCurrentEPG(channel_id), mp_info); //show buttons
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} }
else if (imdb_active && imdb->gotPoster()) else if (imdb_active && imdb->gotPoster())
{ {
@@ -1271,7 +1273,7 @@ int CEpgData::show(const t_channel_id channel_id, uint64_t a_id, time_t* a_start
epgData.eventID, epgData.epg_times.startzeit, 0); epgData.eventID, epgData.epg_times.startzeit, 0);
ShowMsg(LOCALE_TIMER_EVENTTIMED_TITLE, LOCALE_TIMER_EVENTTIMED_MSG, CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO); ShowMsg(LOCALE_TIMER_EVENTTIMED_TITLE, LOCALE_TIMER_EVENTTIMED_MSG, CMsgBox::mbrBack, CMsgBox::mbBack, NEUTRINO_ICON_INFO);
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} }
else else
printf("timerd not available\n"); printf("timerd not available\n");

View File

@@ -378,7 +378,8 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
int oldselected = selected; int oldselected = selected;
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); int timeout = g_settings.timing[SNeutrinoSettings::TIMING_EPG];
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
bool loop = true; bool loop = true;
while (loop) while (loop)
@@ -386,7 +387,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd); g_RCInput->getMsgAbsoluteTimeout(&msg, &data, &timeoutEnd);
if ( msg <= CRCInput::RC_MaxRC ) if ( msg <= CRCInput::RC_MaxRC )
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
if((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer())) { if((msg == NeutrinoMessages::EVT_TIMER) && (data == fader.GetFadeTimer())) {
if(fader.FadeDone()) if(fader.FadeDone())
@@ -492,7 +493,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
hide(); hide();
recDirs.exec(NULL,""); recDirs.exec(NULL,"");
paint(evtlist[selected].channelID); paint(evtlist[selected].channelID);
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} }
else else
{ {
@@ -529,7 +530,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
evtlist[selected].startTime + evtlist[selected].duration, evtlist[selected].startTime + evtlist[selected].duration,
evtlist[selected].description, evtlist[selected].eventID, TIMERD_APIDS_CONF, true, "", &evtlist); evtlist[selected].description, evtlist[selected].eventID, TIMERD_APIDS_CONF, true, "", &evtlist);
m.exec(NULL, ""); m.exec(NULL, "");
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} }
timerlist.clear(); timerlist.clear();
g_Timerd->getTimerList (timerlist); g_Timerd->getTimerList (timerlist);
@@ -559,7 +560,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
g_Timerd->getTimerList (timerlist); g_Timerd->getTimerList (timerlist);
paint(evtlist[selected].channelID ); paint(evtlist[selected].channelID );
paintFoot(evtlist[selected].channelID ); paintFoot(evtlist[selected].channelID );
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} }
else if (msg == (neutrino_msg_t)g_settings.key_channelList_cancel) else if (msg == (neutrino_msg_t)g_settings.key_channelList_cancel)
{ {
@@ -609,7 +610,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
infozone_background = false; infozone_background = false;
paint(channel_id); paint(channel_id);
paintFoot(channel_id); paintFoot(channel_id);
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} }
else if (msg == CRCInput::RC_epg) else if (msg == CRCInput::RC_epg)
{ {
@@ -652,7 +653,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
infozone_background = false; infozone_background = false;
paint(channel_id); paint(channel_id);
paintFoot(channel_id); paintFoot(channel_id);
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} }
} }
} }
@@ -662,7 +663,7 @@ int CEventList::exec(const t_channel_id channel_id, const std::string& channelna
oldEventID = -1; oldEventID = -1;
infozone_background = false; infozone_background = false;
in_search = findEvents(channel_id, channelname); in_search = findEvents(channel_id, channelname);
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
} }
else if (CNeutrinoApp::getInstance()->listModeKey(msg)) { else if (CNeutrinoApp::getInstance()->listModeKey(msg)) {
g_RCInput->postMsg (msg, 0); g_RCInput->postMsg (msg, 0);

View File

@@ -637,7 +637,8 @@ bool CFileBrowser::exec(const char * const dirname)
unsigned int oldselected = selected; unsigned int oldselected = selected;
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_FILEBROWSER]); int timeout = g_settings.timing[SNeutrinoSettings::TIMING_FILEBROWSER];
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
bool loop=true; bool loop=true;
while (loop) while (loop)
@@ -646,7 +647,7 @@ bool CFileBrowser::exec(const char * const dirname)
neutrino_msg_t msg_repeatok = msg & ~CRCInput::RC_Repeat; neutrino_msg_t msg_repeatok = msg & ~CRCInput::RC_Repeat;
if (msg <= CRCInput::RC_MaxRC) if (msg <= CRCInput::RC_MaxRC)
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_FILEBROWSER]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
if(!CRCInput::isNumeric(msg)) if(!CRCInput::isNumeric(msg))
{ {
@@ -947,7 +948,8 @@ bool CFileBrowser::playlist_manager(CFileList &playlist, unsigned int playing)
paint(); paint();
paintFoot(); paintFoot();
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_FILEBROWSER]); int timeout = g_settings.timing[SNeutrinoSettings::TIMING_FILEBROWSER];
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
bool loop=true; bool loop=true;
while (loop) while (loop)
@@ -957,7 +959,7 @@ bool CFileBrowser::playlist_manager(CFileList &playlist, unsigned int playing)
neutrino_msg_t msg_repeatok = msg & ~CRCInput::RC_Repeat; neutrino_msg_t msg_repeatok = msg & ~CRCInput::RC_Repeat;
if (msg <= CRCInput::RC_MaxRC) if (msg <= CRCInput::RC_MaxRC)
timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_FILEBROWSER]); timeoutEnd = CRCInput::calcTimeoutEnd(timeout == 0 ? 0xFFFF : timeout);
if(!CRCInput::isNumeric(msg)) if(!CRCInput::isNumeric(msg))
{ {