summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/vdr.c b/vdr.c
index 4adb1868..fc12f005 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.171 2003/12/22 13:29:24 kls Exp $
+ * $Id: vdr.c 1.172 2004/01/04 11:12:05 kls Exp $
*/
#include <getopt.h>
@@ -511,6 +511,25 @@ int main(int argc, char *argv[])
dsyslog("max. latency time %d seconds", MaxLatencyTime);
}
}
+ // Handle channel modifications:
+ if (!Channels.BeingEdited() && Channels.Modified()) {
+ if (Channels.Lock(false, 100)) {
+ Channels.Save(); //XXX only after user changes???
+ Timers.Save();
+ for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
+ if (Channel && Channel->Modification(CHANNELMOD_RETUNE)) {
+ cRecordControls::ChannelDataModified(Channel);
+ if (Channel->Number() == cDevice::CurrentChannel()) {
+ if (!cDevice::PrimaryDevice()->Replaying()) {
+ isyslog("retuning due to modification of channel %d", Channel->Number());
+ Channels.SwitchTo(Channel->Number());
+ }
+ }
+ }
+ }
+ Channels.Unlock();
+ }
+ }
// Channel display:
if (!EITScanner.Active() && cDevice::CurrentChannel() != LastChannel) {
if (!Menu)