summaryrefslogtreecommitdiff
path: root/timer.c
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2018-02-10 08:10:22 +0100
committerhorchi <vdr@jwendel.de>2018-02-10 08:10:22 +0100
commit911b71c9c70b99b98677179dff404e8eb2432592 (patch)
tree56aee590e84a212f716b4a70ccde3dfec7b1d595 /timer.c
parent59875c10d77355d34b864445e63f635fcc60d853 (diff)
downloadvdr-plugin-epg2vdr-1.1.83.tar.gz
vdr-plugin-epg2vdr-1.1.83.tar.bz2
2018-02-10 version 1.1.83 (horchi)\n - bugfix: Fixed delete of Switch timer\n - added: Fill recording images table with images of existing recordings\n\n1.1.83
Diffstat (limited to 'timer.c')
-rw-r--r--timer.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/timer.c b/timer.c
index 958bff9..07feffb 100644
--- a/timer.c
+++ b/timer.c
@@ -467,14 +467,31 @@ int cUpdate::takeSwitchTimer()
continue;
}
- // if already in list, ignore
+ // check state, did we have it already?
auto it = switchTimers.find(timerid);
+ // ACTION is delete?
+
+ if (timerDb->hasCharValue("ACTION", taDelete))
+ {
+ if (it != switchTimers.end())
+ switchTimers.erase(it);
+
+ timerDb->setCharValue("ACTION", taAssumed);
+ timerDb->setCharValue("STATE", tsDeleted);
+ timerDb->store();
+ continue;
+ }
+
+ // if already in map, ignore
+
if (it != switchTimers.end())
continue;
- // not in map, create
+ // not in map, create it
+ // independend if ACTION is 'pending', 'create' or 'modify' ore something else
+ // that's special for switch timers since we have to get the 'pending' also after a vdr restart
tell(1, "Got switch timer (%ld) for channel '%s' at '%s'",
timerDb->getIntValue("ID"), timerDb->getStrValue("CHANNELID"),