[vdr] nfs sharing epg.data

Udo Richter udo_richter at gmx.de
Sun Nov 4 12:49:59 CET 2007


Klaus Schmidinger wrote:
>> i suggest the introduction of a new command line option to switch
>> off writing any epg data (implicitly switching off epg scan). this way
>> only the server vdr maintains the epg and the clients only read it.
> 
> The clients would only read this once at program start.
> I don't think this would be a good idea...

An EPG 'slave mode' could check the file timestamp of the EPG file from 
time to time and reload EPG on written updates, eg. once a hour or on 
master VDR shutdown. Would be a nice low-tech EPG distribution method.


This could even be done by a plugin: VDR runs with -E-, and the plugin 
watches the real epg file. From the main loop, the plugin could do 
something like this:

time_t lastModified = LastModifiedTime(WatchedFile);
if (lastUpdate < lastModified) {
    cSchedulesLock SchedulesLock;
    if (cSchedules::ClearAll() && cSchedules::Schedules(SchedulesLock)) {
       cSchedules::SetEpgDataFileName(WatchedFile);
       cSchedules::Read();
       cSchedules::SetEpgDataFileName(NULL);
       lastUpdate = lastModified;
       }
    }

(untested, though)
Now just someone has to write the plugin around it. ;)


Cheers,

Udo



More information about the vdr mailing list