diff -ruNbw vdr-1.2.5/CONTRIBUTORS vdr-1.2.6pre3/CONTRIBUTORS
--- vdr-1.2.5/CONTRIBUTORS	Sun Sep 14 13:17:07 2003
+++ vdr-1.2.6pre3/CONTRIBUTORS	Fri Oct 17 16:40:37 2003
@@ -176,6 +176,7 @@
  for fixing a memory leak in cNonBlockingFileReader
  for fixing an uninitialized variable in cDisplayChannel
  for fixing a possible access of invalid file handles in cSIProcessor::Action()
+ for fixing extracting the ES data in cDvbDevice::StillPicture()
 
 Ulrich Röder <roeder@efr-net.de>
  for pointing out that there are channels that have a symbol rate higher than
@@ -267,6 +268,7 @@
 
 Thomas Heiligenmann <thomas@heiligenmann.de>
  for implementing the SVDRP commands LSTR and DELR
+ for adding MPEG1 handling to cDvbDevice::StillPicture()
 
 Norbert Schmidt <nschmidt-nrw@t-online.de>
  for filling in some missing teletext PIDs
@@ -495,6 +497,8 @@
  recording that is still going on
  for fixing checking for VIDEO_STREAM_S in cRemux::SetBrokenLink()
  for suggesting to add 'repeat' function keys '7' and '9'
+ for fixing handling rc key learning in case cRemote::Initialize() returns 'false'
+ for suggesting to change the default "Lifetime" to 99
 
 Reinhard Walter Buchner <rw.buchner@freenet.de>
  for adding some satellites to 'sources.conf'
@@ -568,6 +572,8 @@
  for his help in keeping 'channels.conf.cable' up to date
  for fixing the TS to PES repacker so that it works with MPEG1 streams
  for reporting a problem with empty values in setup.conf
+ for fixing detecting the /dev/videoN devices for GRAB in case there are others
+ before the DVB devices
 
 Guy Roussin <guy.roussin@teledetection.fr>
  for suggesting not to display channel group delimiters without text
@@ -588,6 +594,7 @@
  housekeeping
  for fixing selecting the device, because sometimes an FTA recording terminated a
  CA recording
+ for suggesting to never delete edited recordings automatically if the disk runs full
 
 Gerald Berwolf <genka@genka.de>
  for suggesting to deactivate some templates in tools.h in case some plugin needs to
@@ -598,6 +605,7 @@
 
 Sven Goethel <sgoethel@jausoft.com>
  for making switching audio channels work without stopping/restarting the DMX
+ for fixing initializing the highlight area in cDvbSpuDecoder
 
 Jan Rieger <jan@ricomp.de>
  for suggestions and testing raw keyboard input
@@ -728,6 +736,8 @@
 
 Ralf Klueber <ralf.klueber@vodafone.com>
  for reporting a bug in cutting a recording if there is only a single editing mark
+ for reporting a bug in handling a channels.conf that contains a ":@nnn" line as
+ its last entry
 
 Hermann Gausterer <mrq1@gmx.net>
  for suggesting to switch to the recording channel in case the current channel
@@ -821,3 +831,16 @@
 
 Marco Franceschetti <ordaz@quipo.it>
  for updating 'ca.conf'
+
+Jens Groth <Jens_Groth@t-online.de>
+ for reporting a an outdated driver version number in INSTALL
+
+Andreas Trauer <vdr@trauers.homelinux.net>
+ for fixing missing channel info after an incomplete channel group switch
+ for removing the unused 0x73 (TOT) filter in eit.c
+
+Markus Hardt <markus.hardt@gmx.net>
+ for his help in keeping 'channels.conf.terr' up to date
+
+Thomas Rausch <Thomas.Rausch@gmx.de>
+ for making VDR try to get a timer's channel without RID when loading 'timers.conf'
diff -ruNbw vdr-1.2.5/HISTORY vdr-1.2.6pre3/HISTORY
--- vdr-1.2.5/HISTORY	Wed Sep 17 18:12:38 2003
+++ vdr-1.2.6pre3/HISTORY	Fri Oct 24 16:47:39 2003
@@ -2280,7 +2280,7 @@
 - Fixed a possible crash in case a VFAT file system is used without compiling VDR
   with VFAT=1 (thanks to Ernst Fürst for reporting this one).
 - Now the program uses the values of VIDEODIR and PLUGINDIR defined in Makefile
-  or Makefile.config as defaults (thanks to Steffen Barszus).
+  or Make.config as defaults (thanks to Steffen Barszus).
 - Added the usual menu timeout to the CAM menus.
 
 2003-08-17: Version 1.2.3 (not officially released)
@@ -2402,3 +2402,45 @@
 2003-09-17: Version 1.2.5
 
 - Updated 'channels.conf.cable' (thanks to Stefan Hußfeldt).
+
+2003-10-17: Version 1.2.6pre1
+
+- Updated the required driver version in INSTALL (thanks to Jens Groth for
+  reporting this one).
+- Fixed missing channel info after an incomplete channel group switch (thanks
+  to Andreas Trauer).
+- Fixed handling a channels.conf that contains a ":@nnn" line as its last entry
+  (thanks to Ralf Klueber).
+- Fixed detecting the /dev/videoN devices for GRAB in case there are others
+  before the DVB devices (thanks to Andreas Kool).
+- Updated 'channels.conf.terr' for Berlin (thanks to Markus Hardt).
+- Fixed handling rc key learning in case cRemote::Initialize() returns 'false'
+  (thanks to Oliver Endriss).
+- Fixed initializing the highlight area in cDvbSpuDecoder (thanks to Sven Goethel).
+- Now trying to get a timer's channel without RID when loading 'timers.conf'
+  (thanks to Thomas Rausch).
+- Removed the unused 0x73 (TOT) filter in eit.c (thanks to Andreas Trauer).
+- Fixed extracting the ES data in cDvbDevice::StillPicture() (thanks to Stefan
+  Huelswitt).
+- Added MPEG1 handling to cDvbDevice::StillPicture() (thanks to Thomas
+  Heiligenmann).
+- Changed the default "Lifetime" to 99, which means that recordings will
+  never be deleted automatically in case the disk runs full (suggested by
+  Oliver Endriss). Note that in an existing VDR installation the current
+  value as set in 'setup.conf' will still be used - this change only affects
+  new VDR installations.
+- Edited recordings will now never be deleted automatically if the disk runs
+  full (suggested by Emil Naepflein).
+- Channel IDs are now checked when reading 'channels.conf' to avoid later
+  problems with timers.
+
+2003-10-19: Version 1.2.6pre2
+
+- Improved cDvbDevice::StillPicture() (thanks to Thomas Heiligenmann).
+
+2003-10-24: Version 1.2.6pre3
+
+- Improved cDvbDevice::StillPicture() (thanks to Oliver Endriss).
+- Continuing learning remote control keys in case one rc fails (thanks to
+  Oliver Endriss).
+- Fixed handling comments in editing marks.
diff -ruNbw vdr-1.2.5/INSTALL vdr-1.2.6pre3/INSTALL
--- vdr-1.2.5/INSTALL	Tue Sep  9 21:02:13 2003
+++ vdr-1.2.6pre3/INSTALL	Fri Oct  3 13:49:31 2003
@@ -28,7 +28,7 @@
 you will have to change the definition of DVBDIR in the
 Makefile (see the file Make.config.template).
 
-VDR requires the Linux-DVB card driver version dated 2003-05-24 or higher
+VDR requires the Linux-DVB card driver version dated 2003-08-23 or higher
 to work properly.
 
 After extracting the package, change into the VDR directory
diff -ruNbw vdr-1.2.5/MANUAL vdr-1.2.6pre3/MANUAL
--- vdr-1.2.5/MANUAL	Tue Sep  9 23:38:19 2003
+++ vdr-1.2.6pre3/MANUAL	Fri Oct 17 16:20:45 2003
@@ -327,6 +327,9 @@
   a second. A "start" mark marks the first frame of a resulting video
   sequence, and an "end" mark marks the last frame of that sequence.
 
+  An edited recording (indicated by the '%' character) will never be deleted
+  automatically in case the disk runs full (no matter what "lifetime" it has).
+
 * Programming the Timer
 
   Use the "Timer" menu to maintain your list of timer controlled recordings.
@@ -536,7 +539,7 @@
                          with a priority below PrimaryLimit will never execute.
 
   Default priority = 50  The default Priority and Lifetime values used when
-  Default lifetime = 50  creating a new timer event. A Lifetime value of 99
+  Default lifetime = 99  creating a new timer event. A Lifetime value of 99
                          means that this recording will never be deleted
                          automatically.
 
diff -ruNbw vdr-1.2.5/channels.c vdr-1.2.6pre3/channels.c
--- vdr-1.2.5/channels.c	Tue Sep  9 20:55:26 2003
+++ vdr-1.2.6pre3/channels.c	Fri Oct 17 17:42:40 2003
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: channels.c 1.14 2003/09/09 18:55:26 kls Exp $
+ * $Id: channels.c 1.16 2003/10/17 15:42:40 kls Exp $
  */
 
 #include "channels.h"
@@ -369,6 +369,10 @@
         free(vpidbuf);
         free(apidbuf);
         free(namebuf);
+        if (!GetChannelID().Valid()) {
+           esyslog("ERROR: channel data results in invalid ID!");
+           return false;
+           }
         if (!AllowNonUniqueID && Channels.GetByChannelID(GetChannelID())) {
            esyslog("ERROR: channel data not unique!");
            return false;
@@ -431,10 +435,11 @@
          if (channel->Number() > Number)
             Number = channel->Number();
          }
-      else
+      else {
+         maxNumber = Number;
          channel->SetNumber(Number++);
       }
-  maxNumber = Number - 1;
+      }
 }
 
 cChannel *cChannels::GetByNumber(int Number, int SkipGap)
diff -ruNbw vdr-1.2.5/channels.conf.terr vdr-1.2.6pre3/channels.conf.terr
--- vdr-1.2.5/channels.conf.terr	Sat Aug 30 12:31:55 2003
+++ vdr-1.2.6pre3/channels.conf.terr	Sun Oct  5 11:35:53 2003
@@ -46,13 +46,13 @@
 oneword (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1501:0:0:26432:0:0:0
 Smash Hits! (RADIO):537833:I0C34D0M16B8T2G32Y0:T:27500:0:1201:0:0:26240:0:0:0
 : DVB-T Berlin, Germany
-BBC World:177500:I0C23D0M16B8T8G8Y0:T:27500:49:50:55:0:16387:0:0:0
-FAB:177500:I0C23D0M16B8T8G8Y0:T:27500:3073:3074:3079:0:16576:0:0:0
-WDR:177500:I0C23D0M16B8T8G8Y0:T:27500:241:242:247:0:15:0:0:0
-SWR BW:177500:I0C23D0M16B8T8G8Y0:T:27500:257:258:263:0:16:0:0:0
-MDR Fernsehen:191500:I0C23D0M16B8T8G8Y0:T:27500:101:102:104:0:1:0:0:0
-arte:191500:I0C23D0M16B8T8G8Y0:T:27500:201:202,203:204:0:2:0:0:0
-NDR Fernsehen:191500:I0C23D0M16B8T8G8Y0:T:27500:301:302:304:0:3:0:0:0
+BBC World:177500:I0C23D0M16B7T8G8Y0:T:27500:49:50:55:0:16387:0:0:0
+FAB:177500:I0C23D0M16B7T8G8Y0:T:27500:3073:3074:3079:0:16576:0:0:0
+WDR:177500:I0C23D0M16B7T8G8Y0:T:27500:241:242:247:0:15:0:0:0
+Südwest BW/RP:177500:I0C23D0M16B7T8G8Y0:T:27500:257:258:263:0:16:0:0:0
+MDR Fernsehen:191500:I0C23D0M16B7T8G8Y0:T:27500:101:102:104:0:1:0:0:0
+arte:191500:I0C23D0M16B7T8G8Y0:T:27500:201:202,203:204:0:2:0:0:0
+NDR Fernsehen:191500:I0C23D0M16B7T8G8Y0:T:27500:301:302:304:0:3:0:0:0
 RTL:506000:I0C23D0M16B8T8G8Y0:T:27500:337:338:343:0:16405:0:0:0
 RTL2:506000:I0C23D0M16B8T8G8Y0:T:27500:353:354:359:0:16406:0:0:0
 Super RTL:506000:I0C23D0M16B8T8G8Y0:T:27500:433:434:439:0:16411:0:0:0
@@ -62,7 +62,7 @@
 Phoenix:522000:I0C23D0M16B8T8G8Y0:T:27500:1301:1302:1304:0:13:0:0:0
 Das Erste:522000:I0C23D0M16B8T8G8Y0:T:27500:1401:1402:1404:0:14:0:0:0
 ZDF:570000:I0C23D0M16B8T8G8Y0:T:27500:545:546:551:0:514:0:0:0
-Info/3sat:570000:I0C23D0M16B8T8G8Y0:T:27500:561:562:551:0:515:0:0:0
+Info/3sat:570000:I0C23D0M16B8T8G8Y0:T:27500:561:562:567:0:515:0:0:0
 Doku/KiKa:570000:I0C23D0M16B8T8G8Y0:T:27500:593:594:599:0:517:0:0:0
 Kabel 1:658000:I0C23D0M16B8T8G8Y0:T:27500:161:162:167:0:16394:0:0:0
 N24:658000:I0C23D0M16B8T8G8Y0:T:27500:225:226:231:0:16398:0:0:0
diff -ruNbw vdr-1.2.5/config.c vdr-1.2.6pre3/config.c
--- vdr-1.2.5/config.c	Sun Aug 24 13:00:24 2003
+++ vdr-1.2.6pre3/config.c	Fri Oct 17 16:11:27 2003
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: config.c 1.116 2003/08/24 11:00:24 kls Exp $
+ * $Id: config.c 1.117 2003/10/17 14:11:27 kls Exp $
  */
 
 #include "config.h"
@@ -266,7 +266,7 @@
   SortTimers = 1;
   PrimaryLimit = 0;
   DefaultPriority = 50;
-  DefaultLifetime = 50;
+  DefaultLifetime = 99;
   PausePriority = 10;
   PauseLifetime = 1;
   UseSubtitle = 1;
diff -ruNbw vdr-1.2.5/config.h vdr-1.2.6pre3/config.h
--- vdr-1.2.5/config.h	Wed Sep 17 18:08:56 2003
+++ vdr-1.2.6pre3/config.h	Fri Oct 24 16:31:17 2003
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: config.h 1.174 2003/09/17 16:08:56 kls Exp $
+ * $Id: config.h 1.176.1.2 2003/10/24 14:31:17 kls Exp $
  */
 
 #ifndef __CONFIG_H
@@ -19,8 +19,8 @@
 #include "device.h"
 #include "tools.h"
 
-#define VDRVERSION  "1.2.5"
-#define VDRVERSNUM   10205  // Version * 10000 + Major * 100 + Minor
+#define VDRVERSION  "1.2.6pre3"
+#define VDRVERSNUM   10206  // Version * 10000 + Major * 100 + Minor
 
 #define MAXPRIORITY 99
 #define MAXLIFETIME 99
diff -ruNbw vdr-1.2.5/dvbdevice.c vdr-1.2.6pre3/dvbdevice.c
--- vdr-1.2.5/dvbdevice.c	Sat Sep  6 15:19:33 2003
+++ vdr-1.2.6pre3/dvbdevice.c	Fri Oct 24 16:32:20 2003
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: dvbdevice.c 1.64 2003/09/06 13:19:33 kls Exp $
+ * $Id: dvbdevice.c 1.67.1.2 2003/10/24 14:32:20 kls Exp $
  */
 
 #include "dvbdevice.h"
@@ -307,6 +307,8 @@
 
 // --- cDvbDevice ------------------------------------------------------------
 
+int cDvbDevice::devVideoOffset = -1;
+
 cDvbDevice::cDvbDevice(int n)
 {
   dvbTuner = NULL;
@@ -329,6 +331,35 @@
 
   fd_dvr = -1;
 
+  // The offset of the /dev/video devices:
+
+  if (devVideoOffset < 0) { // the first one checks this
+     FILE *f = NULL;
+     char buffer[PATH_MAX];
+     for (int ofs = 0; ofs < 100; ofs++) {
+         snprintf(buffer, sizeof(buffer), "/proc/video/dev/video%d", ofs);
+         if ((f = fopen(buffer, "r")) != NULL) {
+            if (fgets(buffer, sizeof(buffer), f)) {
+               if (strstr(buffer, "DVB Board")) { // found the _first_ DVB card
+                  devVideoOffset = ofs;
+                  dsyslog("video device offset is %d", devVideoOffset);
+                  break;
+                  }
+               }
+            else
+               break;
+            fclose(f);
+            }
+         else
+            break;
+         }
+     if (devVideoOffset < 0)
+        devVideoOffset = 0;
+     if (f)
+        fclose(f);
+     }
+  devVideoIndex = (devVideoOffset >= 0 && HasDecoder()) ? devVideoOffset++ : -1;
+
   // Video format:
 
   SetVideoFormat(Setup.VideoFormat ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3);
@@ -427,8 +458,10 @@
 
 bool cDvbDevice::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX, int SizeY)
 {
+  if (devVideoIndex < 0)
+     return false;
   char buffer[PATH_MAX];
-  snprintf(buffer, sizeof(buffer), "%s%d", DEV_VIDEO, CardIndex());
+  snprintf(buffer, sizeof(buffer), "%s%d", DEV_VIDEO, devVideoIndex);
   int videoDev = open(buffer, O_RDWR);
   if (videoDev < 0)
      LOG_ERROR_STR(buffer);
@@ -915,21 +948,57 @@
         return;
      int i = 0;
      int blen = 0;
-     while (i < Length - 4) {
-           if (Data[i] == 0x00 && Data[i + 1] == 0x00 && Data[i + 2] == 0x01 && (Data[i + 3] & 0xF0) == 0xE0) {
+     while (i < Length - 6) {
+           if (Data[i] == 0x00 && Data[i + 1] == 0x00 && Data[i + 2] == 0x01) {
+              int len = Data[i + 4] * 256 + Data[i + 5];
+              if ((Data[i + 3] & 0xF0) == 0xE0) { // video packet
               // skip PES header
               int offs = i + 6;
-              int len = Data[i + 4] * 256 + Data[i + 5];
               // skip header extension
               if ((Data[i + 6] & 0xC0) == 0x80) {
+                    // MPEG-2 PES header
+                    if (Data[i + 8] >= Length)
+                       break;
                  offs += 3;
                  offs += Data[i + 8];
                  len -= 3;
                  len -= Data[i + 8];
+                    if (len < 0 || offs + len > Length)
+                       break;
+                    }
+                 else {
+                    // MPEG-1 PES header
+                    while (offs < Length && len > 0 && Data[offs] == 0xFF) {
+                          offs++;
+                          len--;
+                          }
+                    if (offs <= Length - 2 && len >= 2 && (Data[offs] & 0xC0) == 0x40) {
+                       offs += 2;
+                       len -= 2;
                  }
+                    if (offs <= Length - 5 && len >= 5 && (Data[offs] & 0xF0) == 0x20) {
+                       offs += 5;
+                       len -= 5;
+                       }
+                    else if (offs <= Length - 10 && len >= 10 && (Data[offs] & 0xF0) == 0x30) {
+                       offs += 10;
+                       len -= 10;
+                       }
+                    else if (offs < Length && len > 0) {
+                       offs++;
+                       len--;
+                       }
+                    }
+                 if (blen + len > Length) // invalid PES length field
+                    break;
               memcpy(&buf[blen], &Data[offs], len);
               i = offs + len;
               blen += len;
+                 }
+              else if (Data[i + 3] >= 0xBD && Data[i + 3] <= 0xDF) // other PES packets
+                 i += len + 6;
+              else
+                 i++;
               }
            else
               i++;
diff -ruNbw vdr-1.2.5/dvbdevice.h vdr-1.2.6pre3/dvbdevice.h
--- vdr-1.2.5/dvbdevice.h	Fri Aug 15 14:34:55 2003
+++ vdr-1.2.6pre3/dvbdevice.h	Sat Oct  4 13:54:50 2003
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: dvbdevice.h 1.22 2003/08/15 12:34:55 kls Exp $
+ * $Id: dvbdevice.h 1.23 2003/10/04 11:54:50 kls Exp $
  */
 
 #ifndef __DVBDEVICE_H
@@ -73,6 +73,9 @@
 
 // Image Grab facilities
 
+private:
+  static int devVideoOffset;
+  int devVideoIndex;
 public:
   virtual bool GrabImage(const char *FileName, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1);
 
diff -ruNbw vdr-1.2.5/dvbspu.c vdr-1.2.6pre3/dvbspu.c
--- vdr-1.2.5/dvbspu.c	Fri Aug 15 15:04:39 2003
+++ vdr-1.2.6pre3/dvbspu.c	Sun Oct 12 11:43:18 2003
@@ -8,7 +8,7 @@
  *
  * parts of this file are derived from the OMS program.
  *
- * $Id: dvbspu.c 1.4 2003/08/15 13:04:39 kls Exp $
+ * $Id: dvbspu.c 1.5 2003/10/12 09:43:18 kls Exp $
  */
 
 #include <assert.h>
@@ -297,6 +297,10 @@
 {
     clean &= !highlight;
     highlight = false;
+    hlpsize.x1 = -1;
+    hlpsize.y1 = -1;
+    hlpsize.x2 = -1;
+    hlpsize.y2 = -1;
 }
 
 int cDvbSpuDecoder::ScaleYcoord(int value)
diff -ruNbw vdr-1.2.5/eit.c vdr-1.2.6pre3/eit.c
--- vdr-1.2.5/eit.c	Thu May 29 17:04:10 2003
+++ vdr-1.2.6pre3/eit.c	Sun Oct 12 13:05:42 2003
@@ -16,7 +16,7 @@
  *   the Free Software Foundation; either version 2 of the License, or     *
  *   (at your option) any later version.                                   *
  *                                                                         *
- * $Id: eit.c 1.79 2003/05/29 15:04:10 kls Exp $
+ * $Id: eit.c 1.80 2003/10/12 11:05:42 kls Exp $
  ***************************************************************************/
 
 #include "eit.h"
@@ -1166,7 +1166,6 @@
    {
       AddFilter(0x00, 0x00);  // PAT
       AddFilter(0x14, 0x70);  // TDT
-      AddFilter(0x14, 0x73);  // TOT
       AddFilter(0x12, 0x4e, 0xfe);  // event info, actual(0x4e)/other(0x4f) TS, present/following
       AddFilter(0x12, 0x50, 0xfe);  // event info, actual TS, schedule(0x50)/schedule for another 4 days(0x51)
       AddFilter(0x12, 0x60, 0xfe);  // event info, other  TS, schedule(0x60)/schedule for another 4 days(0x61)
@@ -1301,10 +1300,6 @@
                                  ctdt.SetSystemTime();
                               }
                            }
-                              /*XXX this comes pretty often:
-                           else
-                              dsyslog("Time packet was not 0x70 but 0x%02x\n", (int)buf[0]);
-                              XXX*/
                            break;
 
                         case 0x12:
diff -ruNbw vdr-1.2.5/interface.c vdr-1.2.6pre3/interface.c
--- vdr-1.2.5/interface.c	Sun Apr 27 14:08:52 2003
+++ vdr-1.2.6pre3/interface.c	Fri Oct 24 16:38:08 2003
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: interface.c 1.64 2003/04/27 12:08:52 kls Exp $
+ * $Id: interface.c 1.66 2003/10/24 14:38:08 kls Exp $
  */
 
 #include "interface.h"
@@ -329,7 +329,7 @@
   cStatus::MsgOsdHelpKeys(Red, Green, Yellow, Blue);
 }
 
-void cInterface::QueryKeys(cRemote *Remote)
+bool cInterface::QueryKeys(cRemote *Remote)
 {
   WriteText(1, 3, tr("Phase 1: Detecting RC code type"));
   WriteText(1, 5, tr("Press any key on the RC unit"));
@@ -372,7 +372,7 @@
                                  Key = cRemote::Get(100);
                                  if (Key == kUp) {
                                     Clear();
-                                    return;
+                                    return true;
                                     }
                                  else if (Key == kDown) {
                                     ClearEol(0, 6);
@@ -406,7 +406,9 @@
            else
               ClearEol(0, 9);
            }
+     return true;
      }
+  return false;
 }
 
 void cInterface::LearnKeys(void)
@@ -426,9 +428,13 @@
          cRemote::Clear();
          WriteText(1, 1, Headline);
          cRemote::SetLearning(Remote);
-         QueryKeys(Remote);
+         bool rc = QueryKeys(Remote);
          cRemote::SetLearning(NULL);
          Clear();
+         if (!rc) {
+            Close();
+            continue;
+            }
          WriteText(1, 1, Headline);
          WriteText(1, 3, tr("Phase 3: Saving key codes"));
          WriteText(1, 5, tr("Press 'Up' to save, 'Down' to cancel"));
diff -ruNbw vdr-1.2.5/interface.h vdr-1.2.6pre3/interface.h
--- vdr-1.2.5/interface.h	Sat Nov 30 15:37:04 2002
+++ vdr-1.2.6pre3/interface.h	Sun Oct  5 11:42:53 2003
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: interface.h 1.29 2002/11/30 14:37:04 kls Exp $
+ * $Id: interface.h 1.30 2003/10/05 09:42:53 kls Exp $
  */
 
 #ifndef __INTERFACE_H
@@ -24,7 +24,7 @@
   int cols[MaxCols];
   bool interrupted;
   cSVDRP *SVDRP;
-  void QueryKeys(cRemote *Remote);
+  bool QueryKeys(cRemote *Remote);
   void HelpButton(int Index, const char *Text, eDvbColor FgColor, eDvbColor BgColor);
   eKeys Wait(int Seconds = 0, bool KeepChar = false);
 public:
diff -ruNbw vdr-1.2.5/menu.c vdr-1.2.6pre3/menu.c
--- vdr-1.2.5/menu.c	Sun Sep 14 12:49:28 2003
+++ vdr-1.2.6pre3/menu.c	Fri Oct  3 16:36:20 2003
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: menu.c 1.272 2003/09/14 10:49:28 kls Exp $
+ * $Id: menu.c 1.273 2003/10/03 14:36:20 kls Exp $
  */
 
 #include "menu.h"
@@ -2823,6 +2823,7 @@
     case kChanUp:
     case kChanDn|k_Repeat:
     case kChanDn:
+         withInfo = true;
          group = -1;
          Refresh();
          break;
diff -ruNbw vdr-1.2.5/recording.c vdr-1.2.6pre3/recording.c
--- vdr-1.2.5/recording.c	Tue Sep  9 18:02:55 2003
+++ vdr-1.2.6pre3/recording.c	Fri Oct 24 16:47:14 2003
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: recording.c 1.83 2003/09/09 16:02:55 kls Exp $
+ * $Id: recording.c 1.85 2003/10/24 14:47:14 kls Exp $
  */
 
 #include "recording.h"
@@ -124,7 +124,7 @@
            cRecording *r = Recordings.First();
            cRecording *r0 = NULL;
            while (r) {
-                 if (r->lifetime < MAXLIFETIME) { // recordings with MAXLIFETIME live forever
+                 if (!r->IsEdited() && r->lifetime < MAXLIFETIME) { // edited recordings and recordings with MAXLIFETIME live forever
                     if ((r->lifetime == 0 && Priority > r->priority) || // the recording has no guaranteed lifetime and the new recording has higher priority
                         (time(NULL) - r->start) / SECSINDAY > r->lifetime) { // the recording's guaranteed lifetime has expired
                        if (r0) {
@@ -559,6 +559,13 @@
   return level;
 }
 
+bool cRecording::IsEdited(void)
+{
+  const char *s = strrchr(name, '~');
+  s = !s ? name : s + 1;
+  return *s == '%';
+}
+
 bool cRecording::WriteSummary(void)
 {
   if (summary) {
@@ -674,10 +681,8 @@
   const char *p = strchr(s, ' ');
   if (p) {
      p = skipspace(p);
-     if (*p) {
+     if (*p)
         comment = strdup(p);
-        comment[strlen(comment) - 1] = 0; // strips trailing newline
-        }
      }
   return true;
 }
diff -ruNbw vdr-1.2.5/recording.h vdr-1.2.6pre3/recording.h
--- vdr-1.2.5/recording.h	Tue Sep  9 18:00:56 2003
+++ vdr-1.2.6pre3/recording.h	Fri Oct 17 16:27:36 2003
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: recording.h 1.27 2003/09/09 16:00:56 kls Exp $
+ * $Id: recording.h 1.28 2003/10/17 14:27:36 kls Exp $
  */
 
 #ifndef __RECORDING_H
@@ -58,6 +58,7 @@
   const char *PrefixFileName(char Prefix);
   int HierarchyLevels(void);
   bool IsNew(void) { return GetResume() <= 0; }
+  bool IsEdited(void);
   bool WriteSummary(void);
   bool Delete(void);
        // Changes the file name so that it will no longer be visible in the "Recordings" menu
diff -ruNbw vdr-1.2.5/timers.c vdr-1.2.6pre3/timers.c
--- vdr-1.2.5/timers.c	Sun May 11 15:48:49 2003
+++ vdr-1.2.6pre3/timers.c	Sun Oct 12 12:33:09 2003
@@ -4,7 +4,7 @@
  * See the main source file 'vdr.c' for copyright information and
  * how to reach the author.
  *
- * $Id: timers.c 1.5 2003/05/11 13:48:49 kls Exp $
+ * $Id: timers.c 1.6 2003/10/12 10:33:09 kls Exp $
  */
 
 #include "timers.h"
@@ -217,7 +217,7 @@
      strreplace(file, '|', ':');
      strreplace(summary, '|', '\n');
      tChannelID cid = tChannelID::FromString(channelbuffer);
-     channel = cid.Valid() ? Channels.GetByChannelID(cid) : Channels.GetByNumber(atoi(channelbuffer));
+     channel = cid.Valid() ? Channels.GetByChannelID(cid, true) : Channels.GetByNumber(atoi(channelbuffer));
      if (!channel) {
         esyslog("ERROR: channel %s not defined", channelbuffer);
         result = false;
