diff -urN vdr-orig/config.c vdr-1.0.1/config.c
--- vdr-orig/config.c	Tue Apr  2 23:56:51 2002
+++ vdr-1.0.1/config.c	Sat Apr 27 18:29:52 2002
@@ -294,13 +294,56 @@
 
 bool cChannel::Switch(cDvbApi *DvbApi, bool Log)
 {
-  if (!DvbApi)
+//ML
+  cDvbApi *tmpApi;  if (!DvbApi)
+
+
      DvbApi = cDvbApi::PrimaryDvbApi;
+//ML
+  if (DvbApi->GetMaxBadPriority(polarization, frequency) >= 0) {
+     Interface->Error(tr("durch LNB blockiert!"));
+     return false;
+  }
+
+
   if (!DvbApi->Recording() && !groupSep) {
      if (Log)
         isyslog(LOG_INFO, "switching to channel %d", number);
      for (int i = 3; i--;) {
+//ML
+         while ((tmpApi = DvbApi->GetBadDvbApi(polarization, frequency)) != NULL) {
+           tmpApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid1, apid2, dpid1, dpid2, tpid, ca, pnr);
+         }
+
+
          switch (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid1, apid2, dpid1, dpid2, tpid, ca, pnr)) {
+           case scrOk:         return true;
+           case scrNoTransfer: if (Interface)
+                                  Interface->Error(tr("Can't start Transfer Mode!"));
+                               return false;
+           case scrFailed:     break; // loop will retry
+           }
+         esyslog(LOG_ERR, "retrying");
+         }
+     return false;
+     }
+  if (DvbApi->Recording())
+     Interface->Error(tr("Channel locked (recording)!"));
+  return false;
+}
+
+//ML
+bool cChannel::SwitchForced(cDvbApi *DvbApi, bool Log)
+{
+
+  if (!DvbApi)
+     DvbApi = cDvbApi::PrimaryDvbApi;
+
+  if (!DvbApi->Recording() && !groupSep) {
+     if (Log)
+        isyslog(LOG_INFO, "switching to channel %d", number);
+     for (int i = 3; i--;) {
+	 switch (DvbApi->SetChannel(number, frequency, polarization, diseqc, srate, vpid, apid1, apid2, dpid1, dpid2, tpid, ca, pnr)) {
            case scrOk:         return true;
            case scrNoTransfer: if (Interface)
                                   Interface->Error(tr("Can't start Transfer Mode!"));
diff -urN vdr-orig/config.h vdr-1.0.1/config.h
--- vdr-orig/config.h	Sun Apr 21 12:09:56 2002
+++ vdr-1.0.1/config.h	Sat Apr 27 18:29:52 2002
@@ -119,6 +119,10 @@
   bool Parse(const char *s);
   bool Save(FILE *f);
   bool Switch(cDvbApi *DvbApi = NULL, bool Log = true);
+//ML
+  bool SwitchForced(cDvbApi *DvbApi = NULL, bool Log = true);
+
+
   };
 
 enum eTimerActive { taInactive = 0,
diff -urN vdr-orig/dvbapi.c vdr-1.0.1/dvbapi.c
--- vdr-orig/dvbapi.c	Sun Apr 21 13:55:48 2002
+++ vdr-1.0.1/dvbapi.c	Sat Apr 27 18:33:08 2002
@@ -1747,6 +1747,10 @@
 
   SetVideoFormat(Setup.VideoFormat ? VIDEO_FORMAT_16_9 : VIDEO_FORMAT_4_3);
 
+//ML
+  LNBlock = -1;
+
+
   // We only check the devices that must be present - the others will be checked before accessing them:
 
   if (fd_frontend >= 0 && fd_demuxv >= 0 && fd_demuxa1 >= 0 && fd_demuxa2 >= 0 && fd_demuxd1 >= 0 && fd_demuxd2 >= 0 && fd_demuxt >= 0) {
@@ -1846,6 +1850,44 @@
   return ShiftLevel;
 }
 
+//ML
+cDvbApi *cDvbApi::GetBadDvbApi(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 < NumDvbApis; i++) {
+    if (this != dvbApi[i] && dvbApi[i]->GetLNBconf() != lock)
+      return dvbApi[i];
+  }
+  return NULL;
+}
+
+//ML
+int cDvbApi::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 < NumDvbApis; i++) {
+    if (this != dvbApi[i] && dvbApi[i]->GetLNBconf() != lock && dvbApi[i]->Recording()) {
+      if (dvbApi[i]->priority > d) d = dvbApi[i]->priority;
+      }
+  }
+  return d;
+}
+
 cDvbApi *cDvbApi::GetDvbApi(int Ca, int Priority)
 {
   cDvbApi *d = NULL;
@@ -2333,6 +2375,11 @@
 
 eSetChannelResult cDvbApi::SetChannel(int ChannelNumber, int Frequency, char Polarization, int Diseqc, int Srate, int Vpid, int Apid1, int Apid2, int Dpid1, int Dpid2, int Tpid, int Ca, int Pnr)
 {
+//ML
+  int res;
+  FrontendEvent event;
+
+
   StopTransfer();
   StopReplay();
 
@@ -2364,7 +2411,17 @@
   // start replaying in Transfer Mode immediately after switching the channel:
   bool NeedsTransferMode = (this == PrimaryDvbApi && !ProvidesCa(Ca));
 
-  if (!NeedsTransferMode) {
+//ML
+  char lock;
+  if (Frequency >= Setup.LnbSLOF) {
+    lock = 1 ;
+  } else {
+    lock = 0;
+  }
+  if (Polarization == 'v' || Polarization == 'V') lock += 2;
+  if (!NeedsTransferMode || LNBlock != lock) {
+//  if (!NeedsTransferMode) {
+
 
      // Turn off current PIDs:
 
@@ -2388,10 +2445,18 @@
             if (freq < (unsigned int)Setup.LnbSLOF) {
                freq -= Setup.LnbFrequLo;
                tone = SEC_TONE_OFF;
+//ML
+               LNBlock = 0;
+
+
                }
             else {
                freq -= Setup.LnbFrequHi;
                tone = SEC_TONE_ON;
+//ML
+               LNBlock = 1;
+
+
                }
 
             Frontend.Frequency = freq * 1000UL;
@@ -2399,7 +2464,13 @@
             Frontend.u.qpsk.SymbolRate = Srate * 1000UL;
             Frontend.u.qpsk.FEC_inner = FEC_AUTO;
 
-            int volt = (Polarization == 'v' || Polarization == 'V') ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18;
+//ML
+//            int volt = (Polarization == 'v' || Polarization == 'V') ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18;
+            int volt = SEC_VOLTAGE_18;
+			if (Polarization == 'v' || Polarization == 'V') {
+              LNBlock += 2;
+              volt = SEC_VOLTAGE_13;
+            }
 
             // DiseqC:
 
@@ -2454,12 +2525,18 @@
      // Tuning:
 
      CHECK(ioctl(fd_frontend, FE_SET_FRONTEND, &Frontend));
+     if (cFile::FileReady(fd_frontend, 5000)) {
+        res = ioctl(fd_frontend, FE_GET_EVENT, &event);
+           }
+        else
+           esyslog(LOG_ERR, "ERROR %d in frontend get event (channel %d, card %d)", res, ChannelNumber, CardIndex() + 1);
+//ML
+  }
+  if (!NeedsTransferMode) {
 
      // Wait for channel sync:
 
-     if (cFile::FileReady(fd_frontend, 5000)) {
-        FrontendEvent event;
-        int res = ioctl(fd_frontend, FE_GET_EVENT, &event);
+
         if (res >= 0) {
            if (event.type != FE_COMPLETION_EV) {
               esyslog(LOG_ERR, "ERROR: channel %d not sync'ed on DVB card %d!", ChannelNumber, CardIndex() + 1);
@@ -2467,13 +2544,12 @@
                  cThread::RaisePanic();
               return scrFailed;
               }
-           }
-        else
-           esyslog(LOG_ERR, "ERROR %d in frontend get event (channel %d, card %d)", res, ChannelNumber, CardIndex() + 1);
+
         }
      else
         esyslog(LOG_ERR, "ERROR: timeout while tuning");
 
+
      // PID settings:
 
      if (!SetPids(false)) {
@@ -2813,7 +2889,10 @@
         for (int i = 0; i < MAXDVBAPI; i++) {
             cDvbApi *DvbApi = cDvbApi::GetDvbApi(i + 1, MAXPRIORITY + 1);
             if (DvbApi) {
-               if (DvbApi != cDvbApi::PrimaryDvbApi || (cDvbApi::NumDvbApis == 1 && Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600)) {
+//ML               if (DvbApi != cDvbApi::PrimaryDvbApi || (cDvbApi::NumDvbApis == 1 && Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600)) {
+               if (DvbApi != cDvbApi::PrimaryDvbApi || (Setup.EPGScanTimeout && now - lastActivity > Setup.EPGScanTimeout * 3600)) {
+
+
                   if (!(DvbApi->Recording() || DvbApi->Replaying() || DvbApi->Transferring())) {
                      int oldCh = lastChannel;
                      int ch = oldCh + 1;
@@ -2826,7 +2905,10 @@
                            if (Channel) {
                               if (Channel->ca <= MAXDVBAPI && !DvbApi->ProvidesCa(Channel->ca))
                                  break; // the channel says it explicitly needs a different card
-                              if (Channel->pnr && !TransponderScanned(Channel)) {
+//ML                              if (Channel->pnr && !TransponderScanned(Channel)) {
+                              if (Channel->pnr && !TransponderScanned(Channel) && !(DvbApi->GetMaxBadPriority(Channel->polarization, Channel->frequency) >= 0 || (Setup.EPGScanTimeout && now - lastActivity <= Setup.EPGScanTimeout * 3600))) {
+
+
                                  if (DvbApi == cDvbApi::PrimaryDvbApi && !currentChannel)
                                     currentChannel = DvbApi->Channel();
                                  Channel->Switch(DvbApi, false);
diff -urN vdr-orig/dvbapi.h vdr-1.0.1/dvbapi.h
--- vdr-orig/dvbapi.h	Sun Apr 21 11:49:22 2002
+++ vdr-1.0.1/dvbapi.h	Sat Apr 27 18:29:52 2002
@@ -114,6 +114,19 @@
   static bool SetPrimaryDvbApi(int n);
          // Sets the primary DVB device to 'n' (which must be in the range
          // 1...NumDvbApis) and returns true if this was possible.
+//ML
+private:
+  // beschreibt die LNB-Konfiguration
+  char LNBlock;
+public:
+  char GetLNBconf(void) { return LNBlock; }
+
+  cDvbApi *GetBadDvbApi(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
+
+
   static cDvbApi *GetDvbApi(int Ca, int Priority);
          // Selects a free DVB device, avoiding the PrimaryDvbApi if possible.
          // If Ca is not 0, the device with the given number will be returned
diff -urN vdr-orig/menu.c vdr-1.0.1/menu.c
--- vdr-orig/menu.c	Sat Apr 20 11:17:08 2002
+++ vdr-1.0.1/menu.c	Sat Apr 27 18:29:52 2002
@@ -2907,10 +2907,22 @@
 {
   int ch = Timer ? Timer->channel : cDvbApi::CurrentChannel();
   cChannel *channel = Channels.GetByNumber(ch);
+//ML
+  cDvbApi *tmpApi;
+
 
   if (channel) {
      cDvbApi *dvbApi = cDvbApi::GetDvbApi(channel->ca, Timer ? Timer->priority : Setup.DefaultPriority);
-     if (dvbApi) {
+//ML
+
+     if (dvbApi && (dvbApi->GetMaxBadPriority(channel->polarization, channel->frequency) < (Timer ? Timer->priority : Setup.DefaultPriority))) {
+       while ((tmpApi = dvbApi->GetBadDvbApi(channel->polarization, channel->frequency))) {
+         Stop(tmpApi);
+	 channel->SwitchForced(tmpApi, true);
+	}
+//     if (dvbApi) {
+
+
         Stop(dvbApi);
         for (int i = 0; i < MAXDVBAPI; i++) {
             if (!RecordControls[i]) {
@@ -2919,8 +2931,15 @@
                }
             }
         }
-     else if (!Timer || (Timer->priority >= Setup.PrimaryLimit && !Timer->pending))
-        isyslog(LOG_ERR, "no free DVB device to record channel %d!", ch);
+//ML
+     else
+       if (!Timer || (Timer->priority >= Setup.PrimaryLimit && !Timer->pending))
+// elseif (!Timer || (Timer->priority >= Setup.PrimaryLimit && !Timer->pending))
+
+         isyslog(LOG_ERR, "no free DVB device to record channel %d!", ch);
+//ML
+       if (dvbApi && dvbApi->GetMaxBadPriority(channel->polarization, channel->frequency) >= Timer->priority)
+         isyslog(LOG_ERR, "Aufnahme mit anderer Polarisation hat höhere Priorität!");
      }
   else
      esyslog(LOG_ERR, "ERROR: channel %d not defined!", ch);
diff -urN vdr-orig/vdr.c vdr-1.0.1/vdr.c
--- vdr-orig/vdr.c	Fri Mar 29 11:09:20 2002
+++ vdr-1.0.1/vdr.c	Sat Apr 27 18:29:52 2002
@@ -448,8 +448,19 @@
                  case kDown: {
                       int n = cDvbApi::CurrentChannel() + (NORMALKEY(key) == kUp ? 1 : -1);
                       cChannel *channel = Channels.GetByNumber(n);
-                      if (channel)
-                         channel->Switch();
+//ML
+//                      if (channel)
+//                         channel->Switch();
+                      while (channel) {
+                        if (cDvbApi::PrimaryDvbApi->GetMaxBadPriority(channel->polarization, channel->frequency) == -1) {
+                          channel->Switch();
+                          break;
+                        }
+                        n += (NORMALKEY(key) == kUp ? 1 : -1);
+                        channel = Channels.GetByNumber(n);
+                      }
+                      
+
                       break;
                       }
                  // Menu Control:
