Index: libs/libmythtv/datadirect.h
===================================================================
--- libs/libmythtv/datadirect.h	(revision 14260)
+++ libs/libmythtv/datadirect.h	(working copy)
@@ -96,6 +96,7 @@
     QDateTime time;
     QTime     duration;
     bool      repeat;
+    bool      isnew;
     bool      stereo;
     bool      subtitled;
     bool      hdtv;
@@ -213,7 +214,8 @@
 class DDStructureParser: public QXmlDefaultHandler
 {
   public:
-    DDStructureParser(DataDirectProcessor& _ddparent): parent(_ddparent) {}
+    DDStructureParser(DataDirectProcessor& _ddparent) :
+        parent(_ddparent), saw_repeat(false), saw_new(false) {}
 
     bool startElement(const QString &pnamespaceuri, const QString &plocalname,
                       const QString &pqname, const QXmlAttributes &pxmlatts);
@@ -238,8 +240,11 @@
     DataDirectProductionCrew curr_productioncrew;
     DataDirectGenre          curr_genre;
     QString                  lastprogramid;
+    bool                     saw_repeat;
+    bool                     saw_new;
 };
 
+
 typedef QMap<QString,DataDirectStation>    DDStationList; // stationid ->
 typedef vector<DataDirectLineup>           DDLineupList;
 typedef vector<DataDirectLineupMap>        DDLineupChannels;
Index: libs/libmythtv/datadirect.cpp
===================================================================
--- libs/libmythtv/datadirect.cpp	(revision 14260)
+++ libs/libmythtv/datadirect.cpp	(working copy)
@@ -68,9 +68,10 @@
 DataDirectSchedule::DataDirectSchedule() :
     programid(""),              stationid(""),
     time(QDateTime()),          duration(QTime()),
-    repeat(false),              stereo(false),
-    subtitled(false),           hdtv(false),
-    closecaptioned(false),      tvrating(""),
+    repeat(false),              isnew(false),
+    stereo(false),              subtitled(false),
+    hdtv(false),                closecaptioned(false),
+    tvrating(""),
     partnumber(0),              parttotal(0)
 {
 }
@@ -167,7 +168,14 @@
         curr_schedule.duration = QTime(durstr.mid(2, 2).toInt(), 
                                        durstr.mid(5, 2).toInt(), 0, 0);
 
-        curr_schedule.repeat = (pxmlatts.value("repeat") == "true");
+        QString isrepeat = pxmlatts.value("repeat");
+        curr_schedule.repeat = (isrepeat == "true");
+        saw_repeat |= !isrepeat.isEmpty();
+
+        QString isnew = pxmlatts.value("new");
+        curr_schedule.isnew = (isnew == "true");
+        saw_new |= !isnew.isEmpty();
+
         curr_schedule.stereo = (pxmlatts.value("stereo") == "true");
         curr_schedule.subtitled = (pxmlatts.value("subtitled") == "true");
         curr_schedule.hdtv = (pxmlatts.value("hdtv") == "true");
@@ -278,13 +286,13 @@
             "       duration,   isrepeat,    stereo,         "
             "       subtitled,  hdtv,        closecaptioned, "
             "       tvrating,   partnumber,  parttotal,      "
-            "       endtime) "
+            "       endtime,    isnew) "
             "VALUES "
             "     (:PROGRAMID, :STATIONID,  :TIME,           "
             "      :DURATION,  :ISREPEAT,   :STEREO,         "
             "      :SUBTITLED, :HDTV,       :CAPTIONED,      "
             "      :TVRATING,  :PARTNUMBER, :PARTTOTAL,      "
-            "      :ENDTIME)");
+            "      :ENDTIME,   :ISNEW)");
 
         query.bindValue(":PROGRAMID",   curr_schedule.programid);
         query.bindValue(":STATIONID",   curr_schedule.stationid);
@@ -299,6 +307,7 @@
         query.bindValue(":PARTNUMBER",  curr_schedule.partnumber);
         query.bindValue(":PARTTOTAL",   curr_schedule.parttotal);
         query.bindValue(":ENDTIME",     endtime);
+        query.bindValue(":ISNEW",       curr_schedule.isnew);
 
         if (!query.exec())
             MythContext::DBError("Inserting into dd_schedule", query);
@@ -411,6 +420,16 @@
 
 bool DDStructureParser::endDocument() 
 {
+    MSqlQuery query(MSqlQuery::DDCon());
+    query.prepare(
+        "INSERT INTO dd_state (sawrepeat, sawnew) "
+        "VALUES (:SAWREPEAT, :SAWNEW)");
+    query.bindValue(":SAWREPEAT", saw_repeat);
+    query.bindValue(":SAWNEW",    saw_new);
+
+    if (!query.exec())
+        MythContext::DBError("Inserting into dd_state", query);
+
     return true;
 }
  
@@ -597,11 +616,33 @@
 void DataDirectProcessor::UpdateProgramViewTable(uint sourceid)
 {
     MSqlQuery query(MSqlQuery::DDCon());
-   
+
+    query.prepare(
+        "SELECT sawrepeat, sawnew "
+        "FROM dd_state");
+
+    if (!query.exec())
+    {
+        MythContext::DBError("Querying into dd_state", query);
+        return;
+    }
+
+    if (!query.next())
+    {
+        VERBOSE(VB_IMPORTANT, LOC_ERR + "UpdateProgramViewTable no dd_state!");
+        return;
+    }
+
+    bool saw_repeat = query.value(0).toUInt(); (void) saw_repeat;
+    bool saw_new    = query.value(1).toUInt(); (void) saw_new;
+
+//    VERBOSE(VB_GENERAL, LOC + QString("Saw new: %1, saw repeat: %2")
+//            .arg(saw_new).arg(saw_repeat));
+
     if (!query.exec("TRUNCATE TABLE dd_v_program;"))
         MythContext::DBError("Truncating temporary table dd_v_program", query);
 
-    query.prepare(
+    QString qstr =
         "INSERT INTO dd_v_program "
         "     ( chanid,         starttime,       endtime,         "
         "       title,          subtitle,        description,     "
@@ -613,7 +654,7 @@
         "       tvrating,       mpaarating,      programid )      "
         "SELECT chanid,         scheduletime,    endtime,         "
         "       title,          subtitle,        description,     "
-        "       year,           stars,           isrepeat,        "
+        "       year,           stars,           %1,              "
         "       stereo,         subtitled,       hdtv,            "
         "       closecaptioned, partnumber,      parttotal,       "
         "       seriesid,       originalairdate, showtype,        "
@@ -622,8 +663,10 @@
         "FROM channel, dd_schedule, dd_program "
         "WHERE ((dd_schedule.programid = dd_program.programid)  AND "
         "       (channel.xmltvid       = dd_schedule.stationid) AND "
-        "       (channel.sourceid      = :SOURCEID))");
+        "       (channel.sourceid      = :SOURCEID))";
 
+    query.prepare(qstr.arg((saw_new) ? "not isnew" : "isrepeat"));
+
     query.bindValue(":SOURCEID", sourceid);
 
     if (!query.exec())
@@ -1143,6 +1186,9 @@
 {
     QMap<QString,QString> dd_tables;
 
+    dd_tables["dd_state"] =
+        "( sawrepeat bool,               sawnew bool )";
+
     dd_tables["dd_station"] =
         "( stationid char(12),           callsign char(10),     "
         "  stationname varchar(40),      affiliate varchar(25), "
@@ -1171,7 +1217,7 @@
         "  subtitled bool,               hdtv bool,          "
         "  closecaptioned bool,          tvrating char(5),   "
         "  partnumber int,               parttotal int,      "
-        "  endtime datetime, "
+        "  endtime datetime,             isnew bool,         "
         "INDEX progidx (programid) )";
 
     dd_tables["dd_program"] =
