diff -rup mythtv.8922.orig/mythtv/libs/libmythtv/dbcheck.cpp mythtv.8922/mythtv/libs/libmythtv/dbcheck.cpp
Index: setup/backendsettings.cpp
===================================================================
--- setup/backendsettings.cpp.orig	2006-02-12 07:53:09.000000000 -0800
+++ setup/backendsettings.cpp	2006-02-12 10:03:39.000000000 -0800 
@@ -223,6 +224,30 @@
     return gc;
 };
 
+static GlobalSpinBox *EITCrawIdleStart()
+{
+    GlobalSpinBox *gc = new GlobalSpinBox("EITCrawIdleStart", 1, 120, 1);
+    gc->setLabel(QObject::tr("Backend Idle Before EIT Craw (mins)"));
+    gc->setValue(1);
+    QString helpText = QObject::tr(
+        "The amount of time to wait after the backend becomes idle for a given "
+        "capture card before the EIT craw starts.");
+    gc->setHelpText(helpText);
+    return gc;
+}
+
+static GlobalCheckBox *EITCrawLimitTransports()
+{
+    GlobalCheckBox *gc = new GlobalCheckBox("EITCrawLimitTransports");
+    gc->setLabel(QObject::tr("EIT Craw Limits Transports"));
+    gc->setValue(false);
+    gc->setHelpText(QObject::tr("If set, EIT craw will scan only "
+                                "those transports which have either "
+                                "standard_guide_tid or extended_guide_tid "
+                                "entries defined in dtv_privatetypes."));
+    return gc;
+};
+
 static GlobalSpinBox *EITTransportTimeout()
 {
     GlobalSpinBox *gc = new GlobalSpinBox("EITTransportTimeout", 1, 15, 1);
@@ -637,11 +662,17 @@
     group2->addChild(VbiFormat());
     group2->addChild(FreqTable());
     group2->addChild(TimeOffset());
-    group2->addChild(EITTransportTimeout());
     group2->addChild(MasterBackendOverride());
     group2->addChild(DeletesFollowLinks());
     addChild(group2);
 
+    VerticalConfigurationGroup* group2a1 = new VerticalConfigurationGroup(false);
+    group2a1->setLabel(QObject::tr("EIT Scanner Options"));
+    group2a1->addChild(EITTransportTimeout());
+    group2a1->addChild(EITCrawIdleStart());
+    group2a1->addChild(EITCrawLimitTransports());
+    addChild(group2a1);
+
     VerticalConfigurationGroup* group3 = new VerticalConfigurationGroup(false);
     group3->setLabel(QObject::tr("Shutdown/Wakeup Options"));
     group3->addChild(startupCommand());
Index: libs/libmythtv/eitscanner.cpp
===================================================================
--- libs/libmythtv/eitscanner.cpp.orig	2006-02-12 07:54:18.000000000 -0800
+++ libs/libmythtv/eitscanner.cpp	2006-02-12 10:00:38.000000000 -0800
@@ -192,24 +192,50 @@
     parser  = NULL;
 }
 
-void EITScanner::StartActiveScan(TVRec *_rec, uint max_seconds_per_source)
+void EITScanner::StartActiveScan(TVRec *_rec, uint max_seconds_per_source,
+                                 bool limit_transports)
 {
     rec = _rec;
 
     if (!activeScanChannels.size())
     {
         MSqlQuery query(MSqlQuery::InitCon());
-        query.prepare(
-            "SELECT channum, mplexid "
-            "FROM channel, cardinput, capturecard, videosource "
-            "WHERE cardinput.sourceid   = channel.sourceid AND "
-            "      videosource.sourceid = channel.sourceid AND "
-            "      capturecard.cardid   = cardinput.cardid AND "
-            "      channel.mplexid        IS NOT NULL      AND "
-            "      useonairguide        = 1                AND "
-            "      useeit               = 1                AND "
-            "      cardinput.cardid     = :CARDID "
-            "ORDER BY cardinput.sourceid, atscsrcid");
+
+        if (limit_transports)
+            query.prepare(
+                "SELECT MIN(channum), channel.mplexid                        "
+                "FROM channel, dtv_multiplex, dtv_privatetypes, videosource, "
+                "cardinput, capturecard                                      "
+                "WHERE dtv_multiplex.networkid = dtv_privatetypes.networkid  "
+                "AND videosource.sourceid      = channel.sourceid            "
+                "AND cardinput.sourceid        = channel.sourceid            "
+                "AND capturecard.cardid        = cardinput.cardid            "
+                "AND (private_type             = 'extended_guide_tid'        "
+                "OR   private_type             = 'standard_guide_tid')       "
+                "AND private_value             = transportid                 "
+                "AND channel.mplexid           = dtv_multiplex.mplexid       "
+                "AND useonairguide             = 1                           "
+                "AND useeit                    = 1                           "
+                "AND cardinput.cardid          = :CARDID                     "
+                "GROUP BY transportid");
+        else
+            query.prepare(
+                "SELECT MIN(channum), channel.mplexid                         "
+                "FROM channel,videosource,cardinput,capturecard,dtv_multiplex "
+                "LEFT JOIN dtv_privatetypes                                   "
+                "ON dtv_multiplex.networkid = dtv_privatetypes.networkid      "
+                "AND (private_type             = 'extended_guide_tid'         "
+                "OR   private_type             = 'standard_guide_tid')        "
+                "AND private_value             = transportid                  "
+                "WHERE videosource.sourceid      = channel.sourceid           "
+                "AND cardinput.sourceid        = channel.sourceid             "
+                "AND capturecard.cardid        = cardinput.cardid             "
+                "AND channel.mplexid           = dtv_multiplex.mplexid        "
+                "AND useonairguide             = 1                            "
+                "AND useeit                    = 1                            "
+                "AND cardinput.cardid          = :CARDID                      "
+                "GROUP BY transportid");
+
         query.bindValue(":CARDID", rec->GetCaptureCardNum());
 
         if (!query.exec() || !query.isActive())
Index: libs/libmythtv/tv_rec.cpp
===================================================================
--- libs/libmythtv/tv_rec.cpp.orig	2006-02-11 20:24:44.000000000 -0800
+++ libs/libmythtv/tv_rec.cpp	2006-02-12 10:02:04.000000000 -0800
@@ -74,9 +74,6 @@
 #define LOC QString("TVRec(%1): ").arg(cardid)
 #define LOC_ERR QString("TVRec(%1) Error: ").arg(cardid)
 
-/// How many seconds after entering kState_None should we start EIT Scanner
-const uint TVRec::kEITScanStartTimeout = 60; /* 1 minute */
-
 /// How many milliseconds the signal monitor should wait between checks
 const uint TVRec::kSignalMonitoringRate = 50; /* msec */
 
@@ -750,7 +747,8 @@
     {
         // Add some randomness to avoid all cards starting
         // EIT scanning at nearly the same time.
-        uint timeout = kEITScanStartTimeout + random() % 59;
+        uint idle_start = gContext->GetNumSetting("EITCrawIdleStart", 1);
+        uint timeout = (idle_start * 60) + random() % 59;
         eitScanStartTime = eitScanStartTime.addSecs(timeout);
     }
     else
@@ -1160,7 +1158,8 @@
 
     // Add some randomness to avoid all cards starting
     // EIT scanning at nearly the same time.
-    uint timeout = kEITScanStartTimeout + random() % 59;
+    uint idle_start = gContext->GetNumSetting("EITCrawIdleStart", 1);
+    uint timeout = (idle_start * 60) + random() % 59;
     eitScanStartTime = QDateTime::currentDateTime().addSecs(timeout);
 
     while (HasFlags(kFlagRunMainLoop))
@@ -1295,7 +1294,8 @@
             else
             {
                 uint ttMin = gContext->GetNumSetting("EITTransportTimeout", 5);
-                scanner->StartActiveScan(this, ttMin * 60);
+                uint tid_limit = gContext->GetNumSetting("EITCrawLimitTransports", 0);
+                scanner->StartActiveScan(this, ttMin * 60, (tid_limit ? true : false));
                 SetFlags(kFlagEITScannerRunning);
                 eitScanStartTime = QDateTime::currentDateTime().addYears(1);
             }
Index: libs/libmythtv/tv_rec.h
===================================================================
--- libs/libmythtv/tv_rec.h.orig	2006-01-21 08:05:23.000000000 -0800
+++ libs/libmythtv/tv_rec.h	2006-02-12 09:57:46.000000000 -0800
@@ -363,7 +363,6 @@
     QString      rbFileExt;
 
   public:
-    static const uint kEITScanStartTimeout;
     static const uint kSignalMonitoringRate;
 
     // General State flags
Index: libs/libmythtv/siparser.cpp
===================================================================
--- libs/libmythtv/siparser.cpp.orig	2006-02-12 09:55:26.000000000 -0800
+++ libs/libmythtv/siparser.cpp	2006-02-12 09:57:46.000000000 -0800
@@ -346,6 +346,21 @@
                     VERBOSE(VB_SIPARSER, LOC + "Forcing Guide Present");
                 }
             }
+            if (QString(query.value(0).toString()) == "guide_on_single_tid")
+            {
+                if (query.value(1).toString() == "yes")
+                {
+                    PrivateTypes.GuideOnSingleTransport = true;
+                    VERBOSE(VB_SIPARSER, LOC + "Guide is on single transport");
+                }
+            }
+            if (QString(query.value(0).toString()) == "extended_guide_tid")
+            {
+                PrivateTypes.ExtendedGuideOnTransport = query.value(1).toInt();
+                VERBOSE(VB_SIPARSER, LOC +
+                        QString("Dish Network Extended Guide Present on Transport %1")
+                        .arg(PrivateTypes.ExtendedGuideOnTransport));
+            }
             if (QString(query.value(0).toString()) == "guide_fixup")
             {
                 PrivateTypes.EITFixUp = query.value(1).toInt();
@@ -1267,6 +1282,7 @@
     emit TableLoaded();
 
     int CurrentTransport = 0;
+    PrivateTypes.ForceExtendedGuidePresent = false;
 
     uint16_t network_id = buffer[0] << 8 | buffer[1];
     // TODO: Handle Network Specifics here if they aren't set
@@ -1274,6 +1290,19 @@
     //TODO : Make this configurable.
     PrivateTypes.ForceGuidePresent = true;
 
+    if (PrivateTypes.GuideOnSingleTransport)
+        PrivateTypes.GuideTransportID = PrivateTypes.CurrentTransportID;
+
+    if (PrivateTypes.CurrentTransportID == PrivateTypes.ExtendedGuideOnTransport)
+    {
+        PrivateTypes.ForceExtendedGuidePresent = true;
+
+        VERBOSE(VB_SIPARSER, LOC +
+            QString("SDT: Extended guide present on this TID: %1")
+            .arg(head->table_id_ext));
+    }
+
+
     if (PrivateTypesLoaded == false)
         LoadPrivateTypes(network_id);
 
@@ -1391,12 +1420,18 @@
 
     // TODO: This is temp
     Table[EVENTS]->DependencyMet(SERVICES);
-    //Table[EVENTS]->AddPid(0x12,0x00,0x00,true); // see ticket #755
-    Table[EVENTS]->AddPid(0x12,0x7F,0x80,0x12); // see ticket #755
 
-    // This should only be added based on the user enabling 7-9day dishnet
-    // EIT events
-    Table[EVENTS]->AddPid(0x300,0x00,0x00,true);
+    // TODO: Handle BEV extended guide
+    if (PrivateTypes.ForceExtendedGuidePresent)
+    {
+        Table[EVENTS]->AddPid(0x300,0x00,0x00,true); // Dish 9-day
+    }
+    else
+    {
+        // Handle everything else..
+        Table[EVENTS]->AddPid(0x12,0x00,0x00,true); // see ticket #755
+        Table[EVENTS]->AddPid(0x12,0x7F,0x80,0x12); // see ticket #755
+    }
 }
 
 /** \fn SIParser::GetLanguagePriority(const QString&)
Index: libs/libmythtv/sitypes.h
===================================================================
--- libs/libmythtv/sitypes.h.orig	2006-02-12 07:54:20.000000000 -0800
+++ libs/libmythtv/sitypes.h	2006-02-12 09:57:46.000000000 -0800
@@ -125,6 +125,8 @@
     bool          CustomGuidePID;
     uint16_t      GuidePID;
     bool          GuideOnSingleTransport;
+    bool          ForceExtendedGuidePresent;
+    uint16_t      ExtendedGuideOnTransport;
     uint16_t      GuideTransportID;
     /* List of ServiceID:s for which to parse out subtitle from the description.
        Used in EITFixUpStyle4() */
Index: libs/libmythtv/dbcheck.cpp
===================================================================
--- libs/libmythtv/dbcheck.cpp.orig	2006-02-12 07:54:20.000000000 -0800
+++ libs/libmythtv/dbcheck.cpp	2006-02-12 09:57:46.000000000 -0800
@@ -12,11 +12,18 @@
 /// This is the DB schema version expected by the running MythTV instance.
 const QString currentDatabaseVersion = "1123";
 
+/// This is the DB schema minor version used by supplementary patches
+const QString currentDatabaseVersionMinor = "2";
+
 static bool UpdateDBVersionNumber(const QString &newnumber);
+static bool UpdateDBVersionMinor( const QString &newminor);
 static bool performActualUpdate(const QString updates[], QString version,
                                 QString &dbver);
+static bool performMinorUpdate(const QString updates[], QString minor,
+                                QString &dbminor);
 static bool InitializeDatabase(void);
 static bool doUpgradeTVDatabaseSchema(void);
+static bool dbMinorUpdate(void);
 
 /** \defgroup db_schema MythTV Database Schema
 
@@ -353,6 +360,48 @@
     return true;
 }
 
+static bool UpdateDBVersionMinor(const QString &newminor)
+{
+    // delete old schema version
+    MSqlQuery query(MSqlQuery::InitCon());
+
+    QString thequery = "DELETE FROM settings WHERE value='DBSchemaVerMinor';";
+    query.prepare(thequery);
+    query.exec();
+
+    if (query.lastError().type() != QSqlError::None)
+    {
+        QString msg =
+            QString("DB Error (Deleting old DB minor version number): \n"
+                    "Query was: %1 \nError was: %2 \nnew version: %3")
+            .arg(thequery)
+            .arg(MythContext::DBErrorMessage(query.lastError()))
+            .arg(newminor);
+        VERBOSE(VB_IMPORTANT, msg);
+        return false;
+    }
+
+    // set new schema minor
+    thequery = QString("INSERT INTO settings (value, data, hostname) "
+                       "VALUES ('DBSchemaVerMinor', %1, NULL);").arg(newminor);
+    query.prepare(thequery);
+    query.exec();
+
+    if (query.lastError().type() != QSqlError::None)
+    {
+        QString msg =
+            QString("DB Error (Setting new DB minor version number): \n"
+                    "Query was: %1 \nError was: %2 \nnew minor version: %3")
+            .arg(thequery)
+            .arg(MythContext::DBErrorMessage(query.lastError()))
+            .arg(newminor);
+        VERBOSE(VB_IMPORTANT, msg);
+        return false;
+    }
+
+    return true;
+}
+
 /** \fn performActualUpdate(const QString updates[], QString, QString&)
  *  \brief Runs a number of SQL commands, and updates the schema version.
  *
@@ -400,6 +449,44 @@
     return true;
 }
 
+static bool performMinorUpdate(const QString updates[], QString minor,
+                                QString &dbminor)
+{
+    MSqlQuery query(MSqlQuery::InitCon());
+
+    VERBOSE(VB_IMPORTANT, QString("Upgrading to schema minor ") + minor);
+
+    int counter = 0;
+    QString thequery = updates[counter];
+
+    while (thequery != "")
+    {
+        query.prepare(thequery);
+        query.exec();
+
+        if (query.lastError().type() != QSqlError::None)
+        {
+            QString msg =
+                QString("DB Error (Performing database upgrade): \n"
+                        "Query was: %1 \nError was: %2 \nnew minor: %3")
+                .arg(thequery)
+                .arg(MythContext::DBErrorMessage(query.lastError()))
+                .arg(minor);
+            VERBOSE(VB_IMPORTANT, msg);
+            return false;
+        }
+
+        counter++;
+        thequery = updates[counter];
+    }
+
+    if (!UpdateDBVersionMinor(minor))
+        return false;
+
+    dbminor = minor;
+    return true;
+}
+
 /** \fn UpgradeTVDatabaseSchema(void)
  *  \brief This is the function called from outside dbcheck.cpp to update the schema.
  *
@@ -417,17 +504,22 @@
 {
     QString dbver = gContext->GetSetting("DBSchemaVer");
 
-    VERBOSE(VB_IMPORTANT, QString("Current Schema Version: %1").arg(dbver));
+    QString dbminor = gContext->GetSetting("DBSchemaVerMinor");
 
-    if (dbver == currentDatabaseVersion)
+    VERBOSE(VB_IMPORTANT, QString("Current Schema Version: %1.%2").arg(dbver)
+                                                                  .arg(dbminor));
+
+    if ((dbver == currentDatabaseVersion) &&
+        (dbminor == currentDatabaseVersionMinor))
         return true;
 
     MSqlQuery chartype(MSqlQuery::InitCon());
     chartype.prepare("ALTER DATABASE mythconverg DEFAULT CHARACTER SET latin1;");
     chartype.exec();
 
-    VERBOSE(VB_IMPORTANT, QString("Newest Schema Version : %1")
-                                  .arg(currentDatabaseVersion));
+    VERBOSE(VB_IMPORTANT, QString("Newest Schema Version : %1.%2")
+                                  .arg(currentDatabaseVersion)
+                                  .arg(currentDatabaseVersionMinor));
 
     MSqlQuery lockquery(MSqlQuery::InitCon());
 
@@ -459,6 +551,10 @@
 
     bool ret = doUpgradeTVDatabaseSchema();
 
+    // Database version minor updates
+    if (ret)
+        ret = dbMinorUpdate();
+
     if (ret)
         VERBOSE(VB_IMPORTANT, "Database Schema upgrade complete, unlocking.");
     else
@@ -2012,6 +2108,50 @@
     return true;
 }
 
+static bool dbMinorUpdate(void)
+{
+    QString dbminor = gContext->GetSetting("DBSchemaVerMinor");
+    if (dbminor == currentDatabaseVersionMinor)
+        return true;
+    if ((dbminor == "") || (dbminor == "0"))
+    {
+        const QString updates[] = {
+// Dish Network
+"INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)"
+" VALUES('dvb', 4102, 'force_guide_present', 'yes');",
+"INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)"
+" VALUES('dvb', 4102, 'extended_guide_tid', '229');",
+// Bell ExpressVu
+"INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)"
+" VALUES('dvb', 256, 'force_guide_present', 'yes');",
+"INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)"
+" VALUES('dvb', 256, 'guide_on_single_tid', 'yes');",
+"INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)"
+" VALUES('dvb', 257, 'force_guide_present', 'yes');",
+"INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)"
+" VALUES('dvb', 257, 'guide_on_single_tid', 'yes');",
+""
+        };
+        if (!performMinorUpdate(updates, "1", dbminor))
+            return false;
+    }
+
+    if ((dbminor == "1"))
+    {
+        const QString updates[] = {
+// Bell ExpressVu
+"INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)"
+" VALUES('dvb', 256, 'standard_guide_tid', '4');",
+"INSERT INTO dtv_privatetypes (sitype, networkid, private_type, private_value)"
+" VALUES('dvb', 257, 'standard_guide_tid', '102');",
+""
+        };
+        if (!performMinorUpdate(updates, "2", dbminor))
+            return false;
+    }
+
+    return true;
+}
 
 
 bool InitializeDatabase(void)
Index: libs/libmythtv/eitscanner.h
===================================================================
--- libs/libmythtv/eitscanner.h.orig	2005-12-26 16:19:59.000000000 -0800
+++ libs/libmythtv/eitscanner.h	2006-02-12 10:22:53.000000000 -0800
@@ -28,7 +28,8 @@
     void StartPassiveScan(DVBChannel*, DVBSIParser*);
     void StopPassiveScan(void);
 
-    void StartActiveScan(TVRec*, uint max_seconds_per_source);
+    void StartActiveScan(TVRec*, uint max_seconds_per_source,
+                         bool limit_transport=false);
     void StopActiveScan(void);        
 
   public slots:
