From e5ec0550d4828d69c85741bc5a1a775a239b501a Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Fri, 11 Apr 2025 12:39:03 +0200 Subject: [PATCH] Now deleting old recording info before reading modified info file --- CONTRIBUTORS | 1 + HISTORY | 4 +++- recording.c | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index f1ee5291..927cd13a 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -3386,6 +3386,7 @@ Stefan Hofmann for making the info files of recordings only be re-read if they have been modified for reporting missing setting the file name of the info file after renaming a recording for adding '~' to the list of delimiters in cTextWrapper + for suggesting to delete old recording info before reading modified info file Stefan Blochberger for suggesting to automatically display the progress display whenever replay of a diff --git a/HISTORY b/HISTORY index dc1acfe1..34e5069b 100644 --- a/HISTORY +++ b/HISTORY @@ -10090,7 +10090,7 @@ Video Disk Recorder Revision History - Added missing locks to SetMenuItem() functions. - Revised locking in cMenuSchedule and cMenuWhatsOn. -2025-04-08: +2025-04-11: - Added the "override" keyword to virtual functions reimplemented in derived classes. Plugins may want to do the same, but don't have to. @@ -10116,3 +10116,5 @@ Video Disk Recorder Revision History - Moved the call to Empty() back into the pmSlow case (thanks to Andreas Baierl). - Fixed spurious times shown in the progress display when switching from "play" to "fast forward". +- Now deleting old recording info before reading modified info file (suggested by + Stefan Hofmann). diff --git a/recording.c b/recording.c index 88581c6e..7f7d10c0 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 5.38 2025/03/02 11:03:35 kls Exp $ + * $Id: recording.c 5.39 2025/04/11 12:39:03 kls Exp $ */ #include "recording.h" @@ -495,6 +495,10 @@ bool cRecordingInfo::Read(FILE *f) return false; if (modified == st.st_mtime) return true; + if (modified) { + delete ownEvent; + event = ownEvent = new cEvent(0); + } modified = st.st_mtime; cReadLine ReadLine; char *s;