The info file of a recording is now re-read if an update of the video directory is triggered, to make sure modifications from other VDRs are adopted

This commit is contained in:
Klaus Schmidinger 2024-03-04 14:12:37 +01:00
parent bfa25d6276
commit 42db3fbee0
2 changed files with 7 additions and 2 deletions

View File

@ -9900,3 +9900,5 @@ Video Disk Recorder Revision History
Markus Ehrnsperger).
- The primary device no longer starts unnecessary threads if it doesn't have a decoder
(thanks to Markus Ehrnsperger).
- The info file of a recording is now re-read if an update of the video directory
is triggered, to make sure modifications from other VDRs are adopted.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 5.26 2024/01/24 13:24:51 kls Exp $
* $Id: recording.c 5.27 2024/03/04 14:12:37 kls Exp $
*/
#include "recording.h"
@ -1543,7 +1543,8 @@ void cVideoDirectoryScannerThread::ScanVideoDir(const char *DirName, int LinkLev
dsyslog("activated name checking for initial read of video directory");
initial = false;
}
if (Recordings == deletedRecordings || initial || !Recordings->GetByName(buffer)) {
cRecording *Recording = NULL;
if (Recordings == deletedRecordings || initial || !(Recording = Recordings->GetByName(buffer))) {
cRecording *r = new cRecording(buffer);
if (r->Name()) {
r->NumFrames(); // initializes the numFrames member
@ -1557,6 +1558,8 @@ void cVideoDirectoryScannerThread::ScanVideoDir(const char *DirName, int LinkLev
else
delete r;
}
else if (Recording)
Recording->ReadInfo();
StateKey.Remove();
}
else