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,
On Thu, 2005-12-08 at 18:34 +0100, Klaus Schmidinger wrote:
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 ?
VDR automatically writes the epg data into the "epg.data" file every ten minutes.
Sort of related...does vdr write setup.conf every 10 minutes, too, and does it write plugin settings or just vanilla vdr settings? I ask because it sometimes seems to 'forget' some settings after a reboot (several hours later). I have only really noticed it with softdevice settings, so maybe that is the part doing strange things!
Cheers,
Laz
On Thu, Dec 08, 2005 at 06:34:47PM +0100, Klaus Schmidinger wrote:
VDR automatically writes the epg data into the "epg.data" file every ten minutes.
Yes, I know that, for me it's not good : I would like to save it on demand, just before I start mastertimer.
I have tried today without this feature, and missed what I was waiting for.
What about an SVDRP command "SEPG" ?
Thank you,
Gregoire Favre wrote:
On Thu, Dec 08, 2005 at 06:34:47PM +0100, Klaus Schmidinger wrote:
VDR automatically writes the epg data into the "epg.data" file every ten minutes.
Yes, I know that, for me it's not good : I would like to save it on demand, just before I start mastertimer.
I have tried today without this feature, and missed what I was waiting for.
What about an SVDRP command "SEPG" ?
What about LSTE?
Klaus
On Thu, Dec 08, 2005 at 08:24:06PM +0100, Klaus Schmidinger wrote:
What about LSTE?
It's as far as I understand it completely different : it generates an hudge amount of network traffic for "nothing" as one could simply SAVE a file and do the processing out of this file, which is also much faster. And even better : I sometimes got errors while processing with LSTE but never from the file, so I really think it would be great to have some way to force the save of any of the VDR files :)
But I could be completely wrong ;)
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:
diff -Nur vdr-1.2.6a/eit.c vdr-1.2.6/eit.c --- vdr-1.2.6a/eit.c Sun Oct 12 13:05:42 2003 +++ vdr-1.2.6/eit.c Fri Aug 6 11:28:13 2004 @@ -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);
Bis denn
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
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.
This one should work:
--- vdr-1.3.37/epg.c~ 2005-11-11 14:37:43.000000000 +0100 +++ vdr-1.3.37/epg.c 2005-12-09 20:54:31.000000000 +0100 @@ -882,6 +882,12 @@ lastCleanup = now; ReportEpgBugFixStats(true); } + struct stat st; + if (!epgDataFileName || stat (epgDataFileName,&st) != 0) { + lastDump = 0; + } else { + lastDump = st.st_mtime; + } if (epgDataFileName && now - lastDump > 600) { cSafeFile f(epgDataFileName); if (f.Open()) {
=== end of patch ===
Olaf