Index: libs/libmythtv/datadirect.h
===================================================================
--- libs/libmythtv/datadirect.h	(revision 14261)
+++ libs/libmythtv/datadirect.h	(working copy)
@@ -324,8 +324,10 @@
     static void UpdateProgramViewTable(uint sourceid);
 
     // static commands (these update regular DB tables from temp DB tables)
-    static int  UpdateChannelsSafe(uint sourceid, bool insert_channels);
-    static bool UpdateChannelsUnsafe(uint sourceid);
+    static int  UpdateChannelsSafe(
+        uint sourceid, bool insert_channels, bool filter_new_channels);
+    static bool UpdateChannelsUnsafe(
+        uint sourceid, bool filter_new_channels);
     static void DataDirectProgramUpdate(void);
 
     // static command, makes Labs and Schedules Direct ProgramIDs compatible.
Index: libs/libmythtv/sourceutil.h
===================================================================
--- libs/libmythtv/sourceutil.h	(revision 14259)
+++ libs/libmythtv/sourceutil.h	(working copy)
@@ -16,7 +16,7 @@
     static bool    GetListingsLoginData(uint sourceid,
                                         QString &grabber, QString &userid,
                                         QString &passwd,  QString &lineupid);
-    static bool    IsEncoder(uint sourceid);
+    static bool    IsEncoder(uint sourceid, bool strict = false);
     static bool    IsUnscanable(uint sourceid);
     static bool    IsAnySourceScanable(void);
     static bool    UpdateChannelsFromListings(
Index: libs/libmythtv/datadirect.cpp
===================================================================
--- libs/libmythtv/datadirect.cpp	(revision 14261)
+++ libs/libmythtv/datadirect.cpp	(working copy)
@@ -43,7 +43,7 @@
 static QString process_dd_station(uint sourceid,
                                   QString  chan_major, QString  chan_minor,
                                   QString &tvformat,   uint    &freqid);
-static void    update_channel_basic(uint    sourceid,   bool    insert,
+static uint    update_channel_basic(uint    sourceid,   bool    insert,
                                     QString xmltvid,    QString callsign,
                                     QString name,       uint    freqid,
                                     QString chan_major, QString chan_minor);
@@ -679,8 +679,10 @@
         MythContext::DBError("Analyzing table dd_productioncrew", query);
 }
 
-int DataDirectProcessor::UpdateChannelsSafe(uint sourceid,
-                                            bool insert_channels)
+int DataDirectProcessor::UpdateChannelsSafe(
+    uint sourceid,
+    bool insert_channels,
+    bool filter_new_channels)
 {
     int new_channels = 0;
 
@@ -704,6 +706,8 @@
         return -1;
     }
 
+    bool is_encoder = SourceUtil::IsEncoder(sourceid, true);
+
     while (query.next())
     {
         QString xmltvid    = query.value(0).toString();
@@ -713,13 +717,24 @@
         QString chan_major = query.value(4).toString();
         QString chan_minor = query.value(5).toString();
 
-        update_channel_basic(sourceid, insert_channels,
-                             xmltvid, callsign, name, freqid,
-                             chan_major, chan_minor);
+        if (filter_new_channels && is_encoder &&
+            (query.value(5).toUInt() > 0))
+        {
+            VERBOSE(VB_GENERAL, LOC + QString(
+                        "Not adding channel %1-%2 '%3' (%4),\n\t\t\t"
+                        "looks like a digital channel on an analog source.")
+                    .arg(chan_major).arg(chan_minor).arg(name).arg(callsign));
+            continue;
+        }
 
-        if (!insert_channels)
+        uint mods =
+            update_channel_basic(sourceid, insert_channels && is_encoder,
+                                 xmltvid, callsign, name, freqid,
+                                 chan_major, chan_minor);
+
+        if (!insert_channels && !mods)
         {
-            VERBOSE(VB_GENERAL, LOC + QString("Not adding channel %1 (%2).")
+            VERBOSE(VB_GENERAL, LOC + QString("Not adding channel '%1' (%2).")
                     .arg(name).arg(callsign));
         }
         new_channels++;
@@ -728,7 +743,8 @@
     return new_channels;
 }
 
-bool DataDirectProcessor::UpdateChannelsUnsafe(uint sourceid)
+bool DataDirectProcessor::UpdateChannelsUnsafe(
+    uint sourceid, bool filter_new_channels)
 {
     MSqlQuery dd_station_info(MSqlQuery::DDCon());
     dd_station_info.prepare(
@@ -750,6 +766,8 @@
         "    atsc_minor_chan = :MINORCHAN "
         "WHERE xmltvid = :STATIONID AND sourceid = :SOURCEID");
 
+    bool is_encoder = SourceUtil::IsEncoder(sourceid, true);
+
     while (dd_station_info.next())        
     {
         uint    freqid     = dd_station_info.value(3).toUInt();
@@ -759,6 +777,18 @@
         QString channum    = process_dd_station(
             sourceid, chan_major, chan_minor, tvformat, freqid);
 
+        if (filter_new_channels && is_encoder &&
+            (dd_station_info.value(5).toUInt() > 0))
+        {
+            VERBOSE(VB_GENERAL, LOC + QString(
+                        "Not adding channel %1-%2 '%3' (%4),\n\t\t\t"
+                        "looks like a digital channel on an analog source.")
+                    .arg(chan_major).arg(chan_minor)
+                    .arg(dd_station_info.value(1).toString())
+                    .arg(dd_station_info.value(0).toString()));
+            continue;
+        }
+
         chan_update_q.bindValue(":CALLSIGN",  dd_station_info.value(0));
         chan_update_q.bindValue(":NAME",      dd_station_info.value(1));
         chan_update_q.bindValue(":STATIONID", dd_station_info.value(2));
@@ -2091,7 +2121,7 @@
     return channum;
 }
 
-static void update_channel_basic(uint    sourceid,   bool    insert,
+static uint update_channel_basic(uint    sourceid,   bool    insert,
                                  QString xmltvid,    QString callsign,
                                  QString name,       uint    freqid,
                                  QString chan_major, QString chan_minor)
@@ -2124,7 +2154,7 @@
     {
         MythContext::DBError(
             "Getting chanid of existing channel", query);
-        return; // go on to next channel without xmltv
+        return 0; // go on to next channel without xmltv
     }
 
     if (query.next())
@@ -2137,6 +2167,7 @@
             "SET xmltvid = :XMLTVID, name = :NAME, callsign = :CALLSIGN "
             "WHERE chanid = :CHANID AND sourceid = :SOURCEID");
 
+        uint i = 0;
         do
         {
             uint chanid = query.value(0).toInt();
@@ -2156,20 +2187,25 @@
             chan_update_q.bindValue(":XMLTVID",  xmltvid);
             chan_update_q.bindValue(":SOURCEID", sourceid);
 
+            VERBOSE(VB_GENERAL, LOC +
+                    QString("Updating channel %1: '%2' (%3).")
+                    .arg(chanid).arg(name).arg(callsign));
+
             if (!chan_update_q.exec() || !chan_update_q.isActive())
             {
                 MythContext::DBError(
                     "Updating XMLTVID of existing channel", chan_update_q);
                 continue; // go on to next instance of this channel
             }
+            i++;
         }
         while (query.next());
 
-        return; // go on to next channel without xmltv
+        return i; // go on to next channel without xmltv
     }
 
     if (!insert)
-        return; // go on to next channel without xmltv
+        return 0; // go on to next channel without xmltv
 
     // The channel doesn't exist in the DB, insert it...
     int mplexid = -1, majorC, minorC, chanid = 0;
@@ -2183,6 +2219,9 @@
     if ((mplexid > 0) || (minorC == 0))
         chanid = ChannelUtil::CreateChanID(sourceid, channum);
 
+    VERBOSE(VB_GENERAL, LOC + QString("Adding channel %1 '%2' (%3).")
+            .arg(channum).arg(name).arg(callsign));
+
     if (chanid > 0)
     {
         QString icon   = "";
@@ -2200,6 +2239,8 @@
             freq_id,   icon,      tvformat,
             xmltvid);
     }
+
+    return 1;
 }
 
 static void set_lineup_type(const QString &lineupid, const QString &type)
Index: libs/libmythtv/sourceutil.cpp
===================================================================
--- libs/libmythtv/sourceutil.cpp	(revision 14259)
+++ libs/libmythtv/sourceutil.cpp	(working copy)
@@ -114,7 +114,7 @@
     return list;
 }
 
-bool SourceUtil::IsEncoder(uint sourceid)
+bool SourceUtil::IsEncoder(uint sourceid, bool strict)
 {
     bool encoder = true;
 
@@ -135,15 +135,19 @@
         "WHERE sourceid = :SOURCEID");
     query.bindValue(":SOURCEID", sourceid);
 
+    bool has_any_chan = false;
     if (!query.exec() || !query.isActive())
         MythContext::DBError("SourceUtil::IsEncoder", query);
     else
     {
         while (query.next())
+        {
             encoder &= !query.value(0).toInt() && !query.value(1).toInt();
+            has_any_chan = true;
+        }
     }
 
-    return encoder;
+    return (strict && !has_any_chan) ? false: encoder;
 }
 
 bool SourceUtil::IsUnscanable(uint sourceid)
Index: programs/mythfilldatabase/filldata.cpp
===================================================================
--- programs/mythfilldatabase/filldata.cpp	(revision 14259)
+++ programs/mythfilldatabase/filldata.cpp	(working copy)
@@ -36,11 +36,14 @@
 
     bool insert_channels = chan_data.insert_chan(source.id);
     int new_channels = DataDirectProcessor::UpdateChannelsSafe(
-        source.id, insert_channels);
+        source.id, insert_channels, chan_data.filter_new_channels);
 
     //  User must pass "--do-channel-updates" for these updates
     if (chan_data.channel_updates)
-        DataDirectProcessor::UpdateChannelsUnsafe(source.id);
+    {
+        DataDirectProcessor::UpdateChannelsUnsafe(
+            source.id, chan_data.filter_new_channels);
+    }
     // TODO delete any channels which no longer exist in listings source
 
     if (update_icons)
Index: programs/mythfilldatabase/main.cpp
===================================================================
--- programs/mythfilldatabase/main.cpp	(revision 14259)
+++ programs/mythfilldatabase/main.cpp	(working copy)
@@ -156,6 +156,10 @@
         {
             fill_data.chan_data.remove_new_channels = true;
         }
+        else if (!strcmp(a.argv()[argpos], "--do-not-filter-new-channels"))
+        {
+            fill_data.chan_data.filter_new_channels = false;
+        }
         else if (!strcmp(a.argv()[argpos], "--graboptions"))
         {
             if (((argpos + 1) >= a.argc()))
@@ -388,6 +392,13 @@
             cout << "   option.  New channels are automatically removed\n";
             cout << "   for DVB and HDTV sources that use DataDirect.\n";
             cout << "\n";
+            cout << "--do-not-filter-new-channels\n";
+            cout << "   Normally MythTV tries to avoid adding ATSC channels\n";
+            cout << "   to NTSC channel lineups. This option restores the\n";
+            cout << "   behaviour of adding every channel in the downloaded\n";
+            cout << "   channel lineup to MythTV's lineup, in case MythTV's\n";
+            cout << "   smarts fail you.\n";
+            cout << "\n";
             cout << "--graboptions <\"options\">\n";
             cout << "   Pass options to grabber. Do NOT use unless you know\n";
             cout << "   what you are doing. Mythfilldatabase will\n";
Index: programs/mythfilldatabase/channeldata.h
===================================================================
--- programs/mythfilldatabase/channeldata.h	(revision 14259)
+++ programs/mythfilldatabase/channeldata.h	(working copy)
@@ -37,7 +37,8 @@
     ChannelData() :
         interactive(false),         non_us_updating(false),
         channel_preset(false),      channel_updates(false),
-        remove_new_channels(false), cardtype(QString::null) {}
+        remove_new_channels(false), filter_new_channels(true),
+        cardtype(QString::null) {}
 
     bool insert_chan(uint sourceid);
     void handleChannels(int id, QValueList<ChanInfo> *chanlist);
@@ -50,6 +51,7 @@
     bool    channel_preset;
     bool    channel_updates;
     bool    remove_new_channels;
+    bool    filter_new_channels;
     QString cardtype;
 };
 
