diff -u -r vdr-1.2.1-orig/channels.h vdr-1.2.1-lnb-share/channels.h
--- vdr-1.2.1-orig/channels.h	Sat Apr 26 11:15:40 2003
+++ vdr-1.2.1-lnb-share/channels.h	Sat Jun 21 17:05:49 2003
@@ -55,6 +55,14 @@
 
 class cChannel : public cListObject {
   friend class cMenuEditChannel;
+
+//ML
+  friend class cDevice;
+  friend class cEITScanner;
+  friend class cRecordControls;
+  friend class cTimers;
+//ML-Ende
+
 private:
   static char *buffer;
   static const char *ToText(cChannel *Channel);
diff -u -r vdr-1.2.1-orig/device.c vdr-1.2.1-lnb-share/device.c
--- vdr-1.2.1-orig/device.c	Sun Jun  8 11:19:59 2003
+++ vdr-1.2.1-lnb-share/device.c	Sat Jun 21 17:19:20 2003
@@ -38,6 +38,10 @@
 
   SetVideoFormat(Setup.VideoFormat);
 
+//ML
+  LNBlock = -1;
+//ML-Ende
+
   active = false;
 
   mute = false;
@@ -139,6 +143,47 @@
   return (0 <= Index && Index < numDevices) ? device[Index] : NULL;
 }
 
+
+//ML
+cDevice *cDevice::GetBadDevice(char Polarization, int Frequency)
+{
+char lock;
+if (Frequency >= Setup.LnbSLOF) {
+  lock = 1 ;
+} else {
+  lock = 0;
+}
+if (Polarization == 'v' || Polarization == 'V') lock += 2;
+ 
+  for (int i = 0; i < numDevices; i++) {
+    if (this != device[i] && device[i]->GetLNBconf() != lock) {
+      return device[i];
+    }
+  }
+  return NULL;
+}
+
+
+int cDevice::GetMaxBadPriority(char Polarization, int Frequency)
+{
+char lock;
+if (Frequency >= Setup.LnbSLOF) {
+  lock = 1 ;
+} else {
+  lock = 0;
+}
+if (Polarization == 'v' || Polarization == 'V') lock += 2;
+
+int d = -1;
+  for (int i = 0; i < numDevices; i++) {
+    if (device[i]->GetLNBconf() != lock && device[i]->Receiving()) {
+      if (device[i]->Priority() > d) d = device[i]->Priority();
+      }
+  }
+  return d;
+}
+//ML-Ende
+
 cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers)
 {
   cDevice *d = NULL;
@@ -307,9 +352,45 @@
 
 bool cDevice::SwitchChannel(const cChannel *Channel, bool LiveView)
 {
+//ML
+  cDevice *tmpDevice;
+  if (this->GetMaxBadPriority(Channel->polarization, Channel->frequency) >= 0) {
+     Interface->Error(tr("durch LNB blockiert!"));
+     return false;
+  }
+         while ((tmpDevice = GetBadDevice(Channel->polarization, Channel->frequency)) != NULL) {
+	     if (tmpDevice->IsPrimaryDevice() )
+           tmpDevice->SwitchChannelForced(Channel, true);
+         else
+           tmpDevice->SwitchChannelForced(Channel, false);
+         }
+//ML-Ende
+
   if (LiveView)
      isyslog("switching to channel %d", Channel->Number());
   for (int i = 3; i--;) {
+
+      switch (SetChannel(Channel, LiveView)) {
+        case scrOk:           return true;
+        case scrNotAvailable: if (Interface)
+                                 Interface->Error(tr("Channel not available!"));
+                              return false;
+        case scrNoTransfer:   if (Interface)
+                                 Interface->Error(tr("Can't start Transfer Mode!"));
+                              return false;
+        case scrFailed:       break; // loop will retry
+        }
+      esyslog("retrying");
+      }
+  return false;
+}
+
+//ML
+bool cDevice::SwitchChannelForced(const cChannel *Channel, bool LiveView)
+{
+  if (LiveView)
+     isyslog("Force switching to channel %d", Channel->Number());
+  for (int i = 3; i--;) {
       switch (SetChannel(Channel, LiveView)) {
         case scrOk:           return true;
         case scrNotAvailable: if (Interface)
@@ -324,6 +405,8 @@
       }
   return false;
 }
+//ML-Ende
+
 
 bool cDevice::SwitchChannel(int Direction)
 {
@@ -335,7 +418,10 @@
      cChannel *channel;
      while ((channel = Channels.GetByNumber(n, Direction)) != NULL) {
            // try only channels which are currently available
-           if (PrimaryDevice()->ProvidesChannel(channel, Setup.PrimaryLimit) || PrimaryDevice()->CanReplay() && GetDevice(channel, 0))
+//ML
+           if (PrimaryDevice()->GetMaxBadPriority(channel->polarization, channel->frequency) == -1 && (PrimaryDevice()->ProvidesChannel(channel, Setup.PrimaryLimit) || PrimaryDevice()->CanReplay() && GetDevice(channel, 0)))
+//ML-Ende
+
               break;
            n = channel->Number() + Direction;
            }
@@ -369,7 +455,31 @@
   // If this DVB card can't receive this channel, let's see if we can
   // use the card that actually can receive it and transfer data from there:
 
+//ML
+  char lock;
+  bool LNBchange = false;
+  if (Channel->Frequency() >= Setup.LnbSLOF) {
+    lock = 1;
+  } else {
+    lock = 0;
+  }
+  if (Channel->Polarization() == 'v' || Channel->Polarization() == 'V') lock += 2;
+	 if (LNBlock != lock) LNBchange = true;
+     LNBlock = lock;
+//ML-Ende
+
   if (NeedsTransferMode) {
+
+//ML
+    if (LNBchange) {
+      if (IsPrimaryDevice()) {
+        SetChannelDevice(Channel, true);
+      } else {
+        SetChannelDevice(Channel, false);
+      }
+    }
+//ML-Ende
+
      cDevice *CaDevice = GetDevice(Channel, 0);
      if (CaDevice && CanReplay()) {
         cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel
diff -u -r vdr-1.2.1-orig/device.h vdr-1.2.1-lnb-share/device.h
--- vdr-1.2.1-orig/device.h	Sun May 11 10:50:04 2003
+++ vdr-1.2.1-lnb-share/device.h	Sat Jun 21 17:05:11 2003
@@ -87,6 +87,19 @@
          ///< given Priority.
          ///< See ProvidesChannel() for more information on how
          ///< priorities are handled, and the meaning of NeedsDetachReceivers.
+
+//ML
+private:
+  // beschreibt die LNB-Konfiguration
+  char LNBlock;
+public:
+  char GetLNBconf(void) { return LNBlock; }
+  cDevice *GetBadDevice(char Polarization, int Frequency);
+         // Gibt eine DVB-Karte zurück, deren LNB Konfiguration anderes eingestellt ist
+  int GetMaxBadPriority(char Polarization, int Frequency);
+         // Gibt die höchte Priorität aller Aufträge mit anderer LNB Konfiguration zurück
+//ML-Ende
+
   static void SetCaCaps(int Index = -1);
          ///< Sets the CaCaps of the given device according to the Setup data.
          ///< By default the CaCaps of all devices are set.
@@ -171,6 +184,13 @@
   bool SwitchChannel(const cChannel *Channel, bool LiveView);
          ///< Switches the device to the given Channel, initiating transfer mode
          ///< if necessary.
+
+//ML
+  bool SwitchChannelForced(const cChannel *Channel, bool LiveView);
+         ///< Switches the device to the given Channel, initiating transfer mode
+         ///< if necessary.
+//ML-Ende
+
   static bool SwitchChannel(int Direction);
          ///< Switches the primary device to the next available channel in the given
          ///< Direction (only the sign of Direction is evaluated, positive values
diff -u -r vdr-1.2.1-orig/eitscan.c vdr-1.2.1-lnb-share/eitscan.c
--- vdr-1.2.1-orig/eitscan.c	Sat May 24 15:34:59 2003
+++ vdr-1.2.1-lnb-share/eitscan.c	Sat Jun 21 17:04:29 2003
@@ -62,7 +62,11 @@
                          cChannel *Channel = Channels.GetByNumber(lastChannel[Device->DeviceNumber()] + 1, 1);
                          if (Channel) {
                             lastChannel[Device->DeviceNumber()] = Channel->Number();
-                            if (Channel->Sid() && Device->ProvidesChannel(Channel) && !TransponderScanned(Channel)) {
+
+//ML
+                            if (Channel->Sid() && Device->ProvidesChannel(Channel) && !TransponderScanned(Channel) && (!Device->GetBadDevice(Channel->polarization, Channel->frequency) || (Device->GetMaxBadPriority(Channel->polarization, Channel->frequency) == -1 && Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600))) {
+//ML-Ende
+
                                if (Device == cDevice::PrimaryDevice() && !currentChannel) {
                                   currentChannel = Device->CurrentChannel();
                                   }
diff -u -r vdr-1.2.1-orig/menu.c vdr-1.2.1-lnb-share/menu.c
--- vdr-1.2.1-orig/menu.c	Sat Jun  7 14:31:57 2003
+++ vdr-1.2.1-lnb-share/menu.c	Sat Jun 21 11:44:13 2003
@@ -3054,7 +3054,26 @@
      bool NeedsDetachReceivers = false;
      int Priority = Timer ? Timer->Priority() : Pause ? Setup.PausePriority : Setup.DefaultPriority;
      cDevice *device = cDevice::GetDevice(channel, Priority, &NeedsDetachReceivers);
+
      if (device) {
+
+//ML
+	     if (device->GetMaxBadPriority(channel->polarization, channel->frequency) >= Priority) {
+	       isyslog("Aufnahme mit anderer Polarisation hat höhere Priorität!");
+	       Timer->SetPending(false);
+	       return false;
+	     } else {
+	       cDevice *tmpDevice;
+	       while ((tmpDevice = device->GetBadDevice(channel->polarization, channel->frequency))) {
+	         Stop(tmpDevice);
+		     if (tmpDevice->IsPrimaryDevice() )
+	           tmpDevice->SwitchChannelForced(channel, true);
+	         else
+	           tmpDevice->SwitchChannelForced(channel, false);
+	         }
+		 }
+//ML-Ende
+
         if (NeedsDetachReceivers)
            Stop(device);
         if (!device->SwitchChannel(channel, false)) {
diff -u -r vdr-1.2.1-orig/timers.c vdr-1.2.1-lnb-share/timers.c
--- vdr-1.2.1-orig/timers.c	Sun May 11 15:48:49 2003
+++ vdr-1.2.1-lnb-share/timers.c	Sat Jun 21 17:05:33 2003
@@ -386,7 +386,11 @@
 {
   cTimer *t0 = NULL;
   for (cTimer *ti = First(); ti; ti = Next(ti)) {
-      if (!ti->Recording() && ti->Matches(t)) {
+
+//ML
+      if (!ti->Recording() && cDevice::PrimaryDevice()->GetMaxBadPriority(ti->channel->polarization, ti->channel->frequency) < ti->priority && ti->Matches(t)) {
+//ML-Ende
+
          if (!t0 || ti->Priority() > t0->Priority())
             t0 = ti;
          }
diff -u -r vdr-1.2.1-orig/timers.h vdr-1.2.1-lnb-share/timers.h
--- vdr-1.2.1-orig/timers.h	Sun May 11 15:35:53 2003
+++ vdr-1.2.1-lnb-share/timers.h	Sat Jun 21 17:04:11 2003
@@ -23,6 +23,13 @@
 
 class cTimer : public cListObject {
   friend class cMenuEditTimer;
+
+//ML
+  friend class cDevice;
+  friend class cRecordControls;
+  friend class cTimers;
+//ML-Ende
+
 private:
   time_t startTime, stopTime;
   static char *buffer;
