diff options
-rw-r--r-- | CONTRIBUTORS | 3 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | config.c | 5 | ||||
-rw-r--r-- | config.h | 3 | ||||
-rw-r--r-- | vdr.c | 6 |
5 files changed, 15 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index d94f88f2..ee44ada6 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -46,3 +46,6 @@ Miha Setina <mihasetina@softhome.net> Alberto Carraro <bertocar@tin.it> for translating the OSD texts to the Italian language. + +Deti Fliegl <deti@fliegl.de> + for implementing the 'CurrentChannel' setup parameter. @@ -344,3 +344,5 @@ Video Disk Recorder Revision History and then renames it). - In case the video data stream is broken the log message will come only every 5 seconds. +- The current channel is now saved in the 'setup.conf' file when VDR is cancelled, + and will be restored next time it is started (thanks to Deti Fliegl). @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.c 1.38 2001/01/13 15:36:31 kls Exp $ + * $Id: config.c 1.39 2001/01/14 15:29:15 kls Exp $ */ #include "config.h" @@ -724,6 +724,7 @@ cSetup::cSetup(void) MarginStart = 2; MarginStop = 10; EPGScanTimeout = 5; + CurrentChannel = -1; } bool cSetup::Parse(char *s) @@ -743,6 +744,7 @@ bool cSetup::Parse(char *s) else if (!strcasecmp(Name, "MarginStart")) MarginStart = atoi(Value); else if (!strcasecmp(Name, "MarginStop")) MarginStop = atoi(Value); else if (!strcasecmp(Name, "EPGScanTimeout")) EPGScanTimeout = atoi(Value); + else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value); else return false; return true; @@ -795,6 +797,7 @@ bool cSetup::Save(const char *FileName) fprintf(f, "MarginStart = %d\n", MarginStart); fprintf(f, "MarginStop = %d\n", MarginStop); fprintf(f, "EPGScanTimeout = %d\n", EPGScanTimeout); + fprintf(f, "CurrentChannel = %d\n", CurrentChannel); f.Close(); isyslog(LOG_INFO, "saved setup to %s", FileName); return true; @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.37 2001/01/13 14:56:29 kls Exp $ + * $Id: config.h 1.38 2001/01/14 15:29:27 kls Exp $ */ #ifndef __CONFIG_H @@ -268,6 +268,7 @@ public: int SetSystemTime; int MarginStart, MarginStop; int EPGScanTimeout; + int CurrentChannel; cSetup(void); bool Load(const char *FileName); bool Save(const char *FileName = NULL); @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/people/kls/vdr * - * $Id: vdr.c 1.48 2000/12/25 09:43:08 kls Exp $ + * $Id: vdr.c 1.49 2001/01/14 15:29:51 kls Exp $ */ #include <getopt.h> @@ -179,7 +179,7 @@ int main(int argc, char *argv[]) cDvbApi::SetPrimaryDvbApi(Setup.PrimaryDVB); - Channels.SwitchTo(1); + Channels.SwitchTo(Setup.CurrentChannel); cEITScanner EITScanner; @@ -312,6 +312,8 @@ int main(int argc, char *argv[]) } } isyslog(LOG_INFO, "caught signal %d", Interrupted); + Setup.CurrentChannel = cDvbApi::CurrentChannel(); + Setup.Save(); cVideoCutter::Stop(); delete Menu; delete ReplayControl; |