diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2020-12-26 15:49:01 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2020-12-26 15:49:01 +0100 |
commit | 2b3556b460665d9a4036b1623e7e7ff5ff6d37d8 (patch) | |
tree | bee99e68a196ba076440ad6516b5a0149996b6f2 /vdr.c | |
parent | d2e0087c4e13b2acbecc4bafb3cb2ab656c95339 (diff) | |
download | vdr-2b3556b460665d9a4036b1623e7e7ff5ff6d37d8.tar.gz vdr-2b3556b460665d9a4036b1623e7e7ff5ff6d37d8.tar.bz2 |
Implemented "Pattern Timers"2.5.1
Diffstat (limited to 'vdr.c')
-rw-r--r-- | vdr.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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! |