summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2020-12-26 15:49:01 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2020-12-26 15:49:01 +0100
commit2b3556b460665d9a4036b1623e7e7ff5ff6d37d8 (patch)
treebee99e68a196ba076440ad6516b5a0149996b6f2 /vdr.c
parentd2e0087c4e13b2acbecc4bafb3cb2ab656c95339 (diff)
downloadvdr-2b3556b460665d9a4036b1623e7e7ff5ff6d37d8.tar.gz
vdr-2b3556b460665d9a4036b1623e7e7ff5ff6d37d8.tar.bz2
Implemented "Pattern Timers"2.5.1
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/vdr.c b/vdr.c
index 709e2f85..8b8cca39 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.tvdr.de
*
- * $Id: vdr.c 4.34 2020/11/20 13:49:58 kls Exp $
+ * $Id: vdr.c 5.1 2020/12/26 15:49:01 kls Exp $
*/
#include <getopt.h>
@@ -784,6 +784,7 @@ int main(int argc, char *argv[])
KeyMacros.Load(AddDirectory(ConfigDirectory, "keymacros.conf"), true);
Folders.Load(AddDirectory(ConfigDirectory, "folders.conf"));
CamResponsesLoad(AddDirectory(ConfigDirectory, "camresponses.conf"), true);
+ DoneRecordingsPattern.Load(AddDirectory(CacheDirectory, "donerecs.data"));
if (!*cFont::GetFontFileName(Setup.FontOsd)) {
const char *msg = "no fonts available - OSD will not show any text!";
@@ -1098,15 +1099,20 @@ int main(int argc, char *argv[])
static cStateKey TimersStateKey;
cTimers *Timers = cTimers::GetTimersWrite(TimersStateKey);
{
+ LOCK_CHANNELS_READ; // Channels are needed for spawning pattern timers!
// Assign events to timers:
static cStateKey SchedulesStateKey;
if (TimersStateKey.StateChanged())
SchedulesStateKey.Reset(); // we assign events if either the Timers or the Schedules have changed
bool TimersModified = false;
if (const cSchedules *Schedules = cSchedules::GetSchedulesRead(SchedulesStateKey)) {
- Timers->SetSyncStateKey(StateKeySVDRPRemoteTimersPoll);
+ Timers->SetSyncStateKey(StateKeySVDRPRemoteTimersPoll); // setting events shall not trigger a remote timer poll...
if (Timers->SetEvents(Schedules))
TimersModified = true;
+ if (Timers->SpawnPatternTimers(Schedules)) {
+ StateKeySVDRPRemoteTimersPoll.Reset(); // ...but spawning new timers must!
+ TimersModified = true;
+ }
SchedulesStateKey.Remove();
}
TimersStateKey.Remove(TimersModified); // we need to remove the key here, so that syncing StateKeySVDRPRemoteTimersPoll takes effect!