Re: [vdr] Force VDR to save channels.conf

2012-06-02 Thread Klaus Schmidinger

On 27.05.2012 13:37, Anssi Hannula wrote:

26.05.2012 23:54, Tobi kirjoitti:

On 26.05.2012 20:56, Artem Makhutov wrote:


How ever - when I restart VDR the changes are not getting saved to
channels.conf.


Check the syslog. There might be a plugin not cleanly shutting down,
making the vdr abort it's shutdown sequence causing it's settings to not
be saved.


Unless things have changed very recently, VDR doesn't save channels.conf
on shutdown.

It only saves it
a) Immediately after user manually modifies channels via VDR
b) 10 minutes after automatic channel update

I've been hit with this many times as well, so I'd suggest to change VDR
so that it saves automatic channel updates on exit as well. Suggested
patch attached (only compile-tested, so actual testing is needed).


I'm afraid it's not that simple.

channels.conf and timers.conf must always be in sync, because timers
reference channels. Plus you need to have a lock on the Channels list
to prevent any changes from other threads while saving the list.
See the main VDR loop under // Handle channel and timer modifications:

  if ((modified || timeout)  Channels.Lock(false, 100)) {
  if (timeout) {
 Channels.Save();
 Timers.Save();
 ChannelSaveTimeout = 0;
 }

Is it really that important to explicitly save automatic channel changes
when VDR stops? After all, they will be applied again next time VDR tunes
to those transponders...

Klaus

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


Re: [vdr] Force VDR to save channels.conf

2012-05-27 Thread Anssi Hannula
26.05.2012 23:54, Tobi kirjoitti:
 On 26.05.2012 20:56, Artem Makhutov wrote:
 
 How ever - when I restart VDR the changes are not getting saved to
 channels.conf.
 
 Check the syslog. There might be a plugin not cleanly shutting down,
 making the vdr abort it's shutdown sequence causing it's settings to not
 be saved.

Unless things have changed very recently, VDR doesn't save channels.conf
on shutdown.

It only saves it
a) Immediately after user manually modifies channels via VDR
b) 10 minutes after automatic channel update

I've been hit with this many times as well, so I'd suggest to change VDR
so that it saves automatic channel updates on exit as well. Suggested
patch attached (only compile-tested, so actual testing is needed).

-- 
Anssi Hannula
Index: vdr-1.7.26/vdr.c
===
--- vdr-1.7.26/vdr.c
+++ vdr-1.7.26/vdr.c	2012-05-27 14:32:06.886993810 +0300
@@ -1299,6 +1299,10 @@
  Setup.CurrentVolume  = cDevice::CurrentVolume();
  Setup.Save();
  }
+  if (Channels.Modified()) {
+ // Save any automatic channels.conf modifications
+ Channels.Save();
+ }
   cDevice::Shutdown();
   EpgHandlers.Clear();
   PluginManager.Shutdown(true);
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] Force VDR to save channels.conf

2012-05-26 Thread Artem Makhutov

Hello,

I have a headless vdr server - witch is just used for streamdev and xbmc.

I would like to update my channels.conf as it is pretty outdated right 
now


I have set the following in setup.conf and vdr is now searching and is 
detecting new channels.

UpdateChannels = 5

How ever - when I restart VDR the changes are not getting saved to 
channels.conf.


What can I do to make it save channels.conf?

I think that last time I had to do this I had to connect via VNC and the 
vdr-ffnetdev plugin to get the OSD and to press the power button to 
make it shutdown and save the changes...

Is there an easier was to do this?

Thanks, Artem

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


Re: [vdr] Force VDR to save channels.conf

2012-05-26 Thread Steffen Barszus
On Sat, 26 May 2012 20:56:43 +0200
Artem Makhutov ar...@makhutov.org wrote:
 I think that last time I had to do this I had to connect via VNC and
 the vdr-ffnetdev plugin to get the OSD and to press the power
 button to make it shutdown and save the changes...
 Is there an easier was to do this?


svdrpsend hitk power - also works over the network - if configured for
that. 

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


Re: [vdr] Force VDR to save channels.conf

2012-05-26 Thread VDR User
Actually a forced save of setup.conf, channels.conf, and epg.data
would be a good feature to have. You should msg Klaus and see if he
agrees.

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