Re: [vdr] nfs sharing epg.data

2007-11-04 Thread Clemens Kirchgatterer
Klaus Schmidinger [EMAIL PROTECTED] 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...

ic. so vdr only writes to the file (and reads it once at startup) and
gets the EPG from internal data structures in ram on demand. so sharing
epg.data is not so good of an idea.

nevertheless, running vdr in a client-server environment is becoming
increasingly popular so this would be a nice feature. most notably if
you inject epg from different sources (internet).

clemens

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] nfs sharing epg.data

2007-11-04 Thread Udo Richter
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

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] nfs sharing epg.data

2007-11-03 Thread Klaus Schmidinger
On 11/03/07 21:55, Clemens Kirchgatterer wrote:
 is it save to share one epg.data file between multiple vdrs over nfs?
 or should each client maintain its own copy?

Each instance of VDR writes into epg.data without any locking or so.
If you set up more than one VDR that write to the same epg.data,
the last one writing it will win, and if they write at the same time,
results may be undefined.

Klaus

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr