Index: libs/libmythtv/datadirect.h
===================================================================
--- libs/libmythtv/datadirect.h	(revision 14482)
+++ libs/libmythtv/datadirect.h	(working copy)
@@ -215,7 +215,7 @@
 {
   public:
     DDStructureParser(DataDirectProcessor& _ddparent) :
-        parent(_ddparent), saw_repeat(false), saw_new(false) {}
+        parent(_ddparent) {}
 
     bool startElement(const QString &pnamespaceuri, const QString &plocalname,
                       const QString &pqname, const QXmlAttributes &pxmlatts);
@@ -240,8 +240,6 @@
     DataDirectProductionCrew curr_productioncrew;
     DataDirectGenre          curr_genre;
     QString                  lastprogramid;
-    bool                     saw_repeat;
-    bool                     saw_new;
 };
 
 
Index: libs/libmythtv/datadirect.cpp
===================================================================
--- libs/libmythtv/datadirect.cpp	(revision 14482)
+++ libs/libmythtv/datadirect.cpp	(working copy)
@@ -168,14 +168,8 @@
         curr_schedule.duration = QTime(durstr.mid(2, 2).toInt(), 
                                        durstr.mid(5, 2).toInt(), 0, 0);
 
-        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.repeat = (pxmlatts.value("repeat") == "true");
+        curr_schedule.isnew = (pxmlatts.value("new") == "true");
         curr_schedule.stereo = (pxmlatts.value("stereo") == "true");
         curr_schedule.subtitled = (pxmlatts.value("subtitled") == "true");
         curr_schedule.hdtv = (pxmlatts.value("hdtv") == "true");
@@ -420,16 +414,6 @@
 
 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;
 }
  
@@ -617,28 +601,6 @@
 {
     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);
 
@@ -654,7 +616,7 @@
         "       tvrating,       mpaarating,      programid )      "
         "SELECT chanid,         scheduletime,    endtime,         "
         "       title,          subtitle,        description,     "
-        "       year,           stars,           %1,              "
+        "       year,           stars,           isrepeat,        "
         "       stereo,         subtitled,       hdtv,            "
         "       closecaptioned, partnumber,      parttotal,       "
         "       seriesid,       originalairdate, showtype,        "
@@ -665,13 +627,8 @@
         "       (channel.xmltvid       = dd_schedule.stationid) AND "
         "       (channel.sourceid      = :SOURCEID))";
 
-    QString repeat = (saw_new) ?
-        "(not isnew) AND "
-        "(SUBSTRING(dd_program.programid,1,2) IN ('EP', 'SH'))" :
-        "isrepeat";
+    query.prepare(qstr);
 
-    query.prepare(qstr.arg(repeat));
-
     query.bindValue(":SOURCEID", sourceid);
 
     if (!query.exec())
@@ -1244,9 +1201,6 @@
 {
     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), "
