summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2018-03-05 15:49:20 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2018-03-05 15:49:20 +0100
commita7fdd3c1658eea61f678cd273e48fff219d28dd3 (patch)
tree1f9cace055ff6b1cfecb6d441243e4000645f276 /menu.c
parent1f9832b44990621e8ad2ec493d3f1b15132b19cc (diff)
downloadvdr-a7fdd3c1658eea61f678cd273e48fff219d28dd3.tar.gz
vdr-a7fdd3c1658eea61f678cd273e48fff219d28dd3.tar.bz2
When making modifications to remote timers, the local VDR no longer sends a POLL to all remote VDRs
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/menu.c b/menu.c
index ab23a39d..92b0565c 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 4.65 2018/03/03 12:55:57 kls Exp $
+ * $Id: menu.c 4.66 2018/03/05 15:37:23 kls Exp $
*/
#include "menu.h"
@@ -1122,6 +1122,8 @@ eOSState cMenuEditTimer::ProcessKey(eKeys Key)
return osContinue;
if (timer->Local() && timer->Recording() && data.Remote())
cRecordControls::Stop(timer);
+ if (timer->Remote() && data.Remote())
+ Timers->SetSyncStateKey(StateKeySVDRPRemoteTimersPoll);
*timer = data;
}
LOCK_SCHEDULES_READ;
@@ -1296,11 +1298,12 @@ eOSState cMenuTimers::OnOff(void)
if (HasSubMenu())
return osContinue;
cStateKey StateKey;
- cTimers::GetTimersWrite(StateKey);
+ cTimers *Timers = cTimers::GetTimersWrite(StateKey);
cTimer *Timer = GetTimer();
if (Timer) {
Timer->OnOff();
if (Timer->Remote()) {
+ Timers->SetSyncStateKey(StateKeySVDRPRemoteTimersPoll);
cStringList Response;
if (!ExecSVDRPCommand(Timer->Remote(), cString::sprintf("MODT %d %s", Timer->Id(), *Timer->ToText(true)), &Response) || SVDRPCode(Response[0]) != 250)
RemoteTimerError(Timer);
@@ -1357,6 +1360,8 @@ eOSState cMenuTimers::Delete(void)
timersStateKey.Remove();
return osContinue;
}
+ if (Timer->Remote())
+ Timers->SetSyncStateKey(StateKeySVDRPRemoteTimersPoll);
Timers->Del(Timer);
cOsdMenu::Del(Current());
Display();
@@ -1684,6 +1689,8 @@ eOSState cMenuWhatsOn::Record(void)
// must add the timer before HandleRemoteModifications to get proper log messages with timer ids
Timers->Del(Timer);
}
+ else if (Timer->Remote())
+ Timers->SetSyncStateKey(StateKeySVDRPRemoteTimersPoll);
if (HasSubMenu())
CloseSubMenu();
if (Update())
@@ -1990,6 +1997,8 @@ eOSState cMenuSchedule::Record(void)
// must add the timer before HandleRemoteModifications to get proper log messages with timer ids
Timers->Del(Timer);
}
+ else if (Timer->Remote())
+ Timers->SetSyncStateKey(StateKeySVDRPRemoteTimersPoll);
if (HasSubMenu())
CloseSubMenu();
if (Update())
@@ -3144,6 +3153,7 @@ static bool TimerStillRecording(const char *FileName)
if (cTimer *Timer = Timers->GetById(Id, Remote)) {
cTimer OldTimer = *Timer;
Timer->Skip();
+ Timers->SetSyncStateKey(StateKeySVDRPRemoteTimersPoll);
if (Timer->IsSingleEvent()) {
if (HandleRemoteModifications(NULL, Timer))
Timers->Del(Timer);