summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-02-11 14:53:44 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2001-02-11 14:53:44 +0100
commit80a42f130003dabf7c70de35f446f4dbcf1ea3cf (patch)
treea008421d972a9c4eefd20d81dfb0cddbd7802b9e /vdr.c
parentc0ed9649a3f32b4510eddb47dfd82bcc860eac70 (diff)
downloadvdr-80a42f130003dabf7c70de35f446f4dbcf1ea3cf.tar.gz
vdr-80a42f130003dabf7c70de35f446f4dbcf1ea3cf.tar.bz2
Removing empty directories
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/vdr.c b/vdr.c
index ead90e5b..4fb33a9c 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.52 2001/02/04 19:41:24 kls Exp $
+ * $Id: vdr.c 1.53 2001/02/11 14:51:44 kls Exp $
*/
#include <getopt.h>
@@ -44,6 +44,8 @@
#define KEYS_CONF "keys.conf"
#endif
+#define ACTIVITYTIMEOUT 60 // seconds before starting housekeeping
+
static int Interrupted = 0;
static void SignalHandler(int signum)
@@ -218,6 +220,7 @@ int main(int argc, char *argv[])
cReplayControl *ReplayControl = NULL;
int LastChannel = -1;
int PreviousChannel = cDvbApi::CurrentChannel();
+ time_t LastActivity = time(NULL);
while (!Interrupted) {
// Channel display:
@@ -324,8 +327,14 @@ int main(int argc, char *argv[])
EITScanner.Process();
cVideoCutter::Active();
}
- if (!*Interact && !cRecordControls::Active())
- RemoveDeletedRecordings();
+ if (!*Interact && !cRecordControls::Active()) {
+ if (time(NULL) - LastActivity > ACTIVITYTIMEOUT) {
+ RemoveDeletedRecordings();
+ LastActivity = time(NULL);
+ }
+ }
+ else
+ LastActivity = time(NULL);
}
isyslog(LOG_INFO, "caught signal %d", Interrupted);
Setup.CurrentChannel = cDvbApi::CurrentChannel();