summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-04-26 13:43:46 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-04-26 13:43:46 +0200
commit2ac56b497dc1e063667ac5bcbc267a2ba50ee2bf (patch)
tree3ab93600f9d69a0844c0ef9ef3abb3ff1e751349 /config.c
parent3b656e9e46632e53b32714728e3ce3123995a916 (diff)
downloadvdr-2ac56b497dc1e063667ac5bcbc267a2ba50ee2bf.tar.gz
vdr-2ac56b497dc1e063667ac5bcbc267a2ba50ee2bf.tar.bz2
Default duration of instant recording is 3 hours (and configurable)
Diffstat (limited to 'config.c')
-rw-r--r--config.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/config.c b/config.c
index 66007379..be0defe2 100644
--- a/config.c
+++ b/config.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: config.c 1.97 2002/04/06 09:58:36 kls Exp $
+ * $Id: config.c 1.98 2002/04/26 12:30:00 kls Exp $
*/
#include "config.h"
@@ -332,7 +332,8 @@ cTimer::cTimer(bool Instant)
struct tm *now = localtime_r(&t, &tm_r);
day = now->tm_mday;
start = now->tm_hour * 100 + now->tm_min;
- stop = start + 200; // "instant recording" records 2 hours by default
+ stop = now->tm_hour * 60 + now->tm_min + Setup.InstantRecordTime;
+ stop = (stop / 60) * 100 + (stop % 60);
if (stop >= 2400)
stop -= 2400;
//TODO VPS???
@@ -930,6 +931,7 @@ cSetup::cSetup(void)
MenuScrollPage = 1;
MarkInstantRecord = 1;
strcpy(NameInstantRecord, "TITLE EPISODE");
+ InstantRecordTime = 180;
LnbSLOF = 11700;
LnbFrequLo = 9750;
LnbFrequHi = 10600;
@@ -1017,6 +1019,7 @@ bool cSetup::Parse(char *s)
else if (!strcasecmp(Name, "MenuScrollPage")) MenuScrollPage = atoi(Value);
else if (!strcasecmp(Name, "MarkInstantRecord")) MarkInstantRecord = atoi(Value);
else if (!strcasecmp(Name, "NameInstantRecord")) strn0cpy(NameInstantRecord, Value, MaxFileName);
+ else if (!strcasecmp(Name, "InstantRecordTime")) InstantRecordTime = atoi(Value);
else if (!strcasecmp(Name, "LnbSLOF")) LnbSLOF = atoi(Value);
else if (!strcasecmp(Name, "LnbFrequLo")) LnbFrequLo = atoi(Value);
else if (!strcasecmp(Name, "LnbFrequHi")) LnbFrequHi = atoi(Value);
@@ -1099,6 +1102,7 @@ bool cSetup::Save(const char *FileName)
fprintf(f, "MenuScrollPage = %d\n", MenuScrollPage);
fprintf(f, "MarkInstantRecord = %d\n", MarkInstantRecord);
fprintf(f, "NameInstantRecord = %s\n", NameInstantRecord);
+ fprintf(f, "InstantRecordTime = %d\n", InstantRecordTime);
fprintf(f, "LnbSLOF = %d\n", LnbSLOF);
fprintf(f, "LnbFrequLo = %d\n", LnbFrequLo);
fprintf(f, "LnbFrequHi = %d\n", LnbFrequHi);