[vdr] ScanVideoDir is holding back VDR for up to 15min at Startup
schierz at vschierz.de
Sun Apr 16 12:20:08 CEST 2006
I think there will be no problems on single disk systems cause of they
have enough speed, but I found a Problem with external NFS-Devices.
Beside my internal video-device I'm using one harddisk for Music, one
for all of my Image's and an additional
Device for VDR-Recordings.
Cause of the slower network-access the initial scanning for recordings
and empty directories, VDR
is scanning all that Sound and Image-Stuff for several minutes. If I
include my 4 GB cddb-archiv, it is about 20 minutes.
Therefor I changed the code of ScanVideoDir with a simple extension. It
now looks first wether a file ".vdrexclude" Exists. If so it skips the
entire directory-tree. This makes it easy to exclude a subdirectory tree
by simply touching ".vdrexclude" in a directory that will not contain
Might be, this could find a way into VDR sometimes.
And here is what I did:
void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int
LinkLevel) ... ... ...
// Start changes 1
asprintf(&excludeFile, "%s/%s", buffer, ".vdrexclude");
if( access( excludeFile,0) )
// End changes 1
if (endswith(buffer, deleted ? DELEXT : RECEXT))
cRecording *r = new cRecording(buffer);
r->fileSizeMB = DirSizeMB(buffer);
r->deleted = time(NULL);
ScanVideoDir(buffer, Foreground, LinkLevel + Link);
// Start changes 2
// End Changes 2
More information about the vdr