From cc0e1a1586517c1f39caec39a38dfad1ee5dbacd Mon Sep 17 00:00:00 2001 From: martii Date: Thu, 15 Sep 2016 00:51:01 +0200 Subject: [PATCH] timerd/timermanager: fix EPG auto-adjustment of recordings Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/659f2b372df0cec64b305ac82b29744ad8f8d48c Author: martii Date: 2016-09-15 (Thu, 15 Sep 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/epgview.cpp | 4 ++-- src/gui/followscreenings.cpp | 2 +- src/timerd/timermanager.cpp | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 6fbe5cc09..4a65e8944 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -1170,7 +1170,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.eventID, epgData.epg_times.startzeit, epgData.epg_times.startzeit - (ANNOUNCETIME + 120 ), - TIMERD_APIDS_CONF, true, true, recDir, false) == -1) + TIMERD_APIDS_CONF, true, epgData.epg_times.startzeit - (ANNOUNCETIME + 120) > time(NULL), recDir, false) == -1) { if (askUserOnTimerConflict(epgData.epg_times.startzeit - (ANNOUNCETIME + 120), epgData.epg_times.startzeit + epgData.epg_times.dauer)) @@ -1180,7 +1180,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.eventID, epgData.epg_times.startzeit, epgData.epg_times.startzeit - (ANNOUNCETIME + 120 ), - TIMERD_APIDS_CONF, true, true, 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, CMessageBox::mbrBack, CMessageBox::mbBack, NEUTRINO_ICON_INFO); timeoutEnd = CRCInput::calcTimeoutEnd(g_settings.timing[SNeutrinoSettings::TIMING_EPG]); } diff --git a/src/gui/followscreenings.cpp b/src/gui/followscreenings.cpp index d286f54a4..475b8cdc4 100644 --- a/src/gui/followscreenings.cpp +++ b/src/gui/followscreenings.cpp @@ -111,7 +111,7 @@ int CFollowScreenings::exec(CMenuTarget* /*parent*/, const std::string & actionK CZapitChannel * ch = CServiceManager::getInstance()->FindChannel(channel_id); if (g_Timerd->addRecordTimerEvent(channel_id, e->startTime, e->startTime + e->duration, e->eventID, - e->startTime, e->startTime - (ANNOUNCETIME + 120 ), apids, true, true, recDir, true, ch->bUseCI) == -1) { //NI + e->startTime, e->startTime - (ANNOUNCETIME + 120 ), apids, true, e->startTime - (ANNOUNCETIME + 120) > time(NULL), recDir, true, ch->bUseCI) == -1) { //NI //FIXME -- no error handling, but this shouldn't happen ... } else { #if 0 diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index 76f70032e..2547995ac 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -1311,6 +1311,9 @@ void CTimerEvent_Record::Refresh() //------------------------------------------------------------ bool CTimerEvent_Record::adjustToCurrentEPG() { + if (!autoAdjustToEPG) + return false; + CChannelEventList evtlist; CEitManager::getInstance()->getEventsServiceKey(eventInfo.channel_id, evtlist);