A way to force writing the epg.data ?
Commit Message
Gregoire Favre wrote:
> Hello,
>
> is there a way (maybe with SVDRP) to force VDR to write the epg.data to
> the disk in order to be able to use mastertimer on it ?
>
> Thank you very much,
Personally i've patched VDR ever since i've started writing Master-Timer
nearly 5 years ago.
The patch 'shifts' the 10 minutes writing to:
the epg.data-file has to be at least 10 minutes out of time
After that you just have to make the epg.data file a bit older and VDR
updates it the next moment.
touch -r /bin/bash /video/video0/epg.data
Here's the patch:
Bis denn
Comments
On Thu, Dec 08, 2005 at 09:07:51PM +0100, Matthias Schniedermeyer wrote:
> Personally i've patched VDR ever since i've started writing Master-Timer
> nearly 5 years ago.
Wouldn't it be just great to have an SVDRP command that save the
epg.data without the need to patch VDR ?
> The patch 'shifts' the 10 minutes writing to:
> the epg.data-file has to be at least 10 minutes out of time
Great, I have to look on how to apply such a patch against vdr-1.3.37.
Thank you very much,
Gregoire Favre wrote:
> On Thu, Dec 08, 2005 at 09:07:51PM +0100, Matthias Schniedermeyer wrote:
>
>
>>Personally i've patched VDR ever since i've started writing Master-Timer
>>nearly 5 years ago.
>
> Wouldn't it be just great to have an SVDRP command that save the
> epg.data without the need to patch VDR ?
I think i asked Klaus about that sometime.
Guess it just wasn't important. :-)
I've always "scan-channels"-d manually for nearly 5 years.
But you just made me change that script to do the 'touch' after zapping
though the channels, so that i don't have to do that manually anymore.
Thank you for saving me a few seconds per day. :-)
I can't believe that in five years that idea never came to my mind. :-)
>>The patch 'shifts' the 10 minutes writing to:
>>the epg.data-file has to be at least 10 minutes out of time
>
> Great, I have to look on how to apply such a patch against vdr-1.3.37.
A grep for epg.data should quickly unravel where VDR looks if the 10
minutes are over.
Bis denn
@@ -1194,6 +1194,15 @@
time_t now = time(NULL);
struct tm tm_r;
struct tm *ptm = localtime_r(&now, &tm_r);
+ struct stat st;
+ if (stat (AddDirectory(VideoDirectory, "epg.data"),&st) != 0)
+ {
+ lastDump = 0;
+ }
+ else
+ {
+ lastDump = st.st_mtime;
+ }
if (now - lastCleanup > 3600 && ptm->tm_hour == 5)
{
cMutexLock MutexLock(&schedulesMutex);