Permalink
Browse files

Improve check for whether mythfilldatabase inserted data.

Only consider channels which have an xmltvid when checking whether
mythfilldatabase inserted any data.  This will better handle error
reporting for users who have sources with different channels using XMLTV
(or Schedules Direct) and EIT.

Fixes #9990

Signed-off-by: Michael T. Dean <mdean@mythtv.org>
  • Loading branch information...
1 parent 474da62 commit a98783e19e07954c31a0148fbc2ef57d57dff077 @dekarl dekarl committed with sphery Dec 6, 2011
Showing with 4 additions and 4 deletions.
  1. +2 −2 mythtv/programs/mythfilldatabase/filldata.cpp
  2. +2 −2 mythtv/programs/mythfilldatabase/main.cpp
View
4 mythtv/programs/mythfilldatabase/filldata.cpp
@@ -552,7 +552,7 @@ bool FillData::Run(SourceList &sourcelist)
query.prepare("SELECT MAX(endtime) FROM program p LEFT JOIN channel c "
"ON p.chanid=c.chanid WHERE c.sourceid= :SRCID "
- "AND manualid = 0;");
+ "AND manualid = 0 AND c.xmltvid != '';");
query.bindValue(":SRCID", (*it).id);
if (query.exec() && query.size() > 0)
@@ -962,7 +962,7 @@ bool FillData::Run(SourceList &sourcelist)
query.prepare("SELECT MAX(endtime) FROM program p LEFT JOIN channel c "
"ON p.chanid=c.chanid WHERE c.sourceid= :SRCID "
- "AND manualid = 0;");
+ "AND manualid = 0 AND c.xmltvid != '';");
query.bindValue(":SRCID", (*it).id);
if (query.exec() && query.size() > 0)
View
4 mythtv/programs/mythfilldatabase/main.cpp
@@ -376,7 +376,7 @@ int main(int argc, char *argv[])
query.prepare("SELECT MAX(endtime) FROM program p LEFT JOIN channel c "
"ON p.chanid=c.chanid WHERE c.sourceid= :SRCID "
- "AND manualid = 0;");
+ "AND manualid = 0 AND c.xmltvid != '';");
query.bindValue(":SRCID", fromfile_id);
if (query.exec() && query.next())
@@ -396,7 +396,7 @@ int main(int argc, char *argv[])
query.prepare("SELECT MAX(endtime) FROM program p LEFT JOIN channel c "
"ON p.chanid=c.chanid WHERE c.sourceid= :SRCID "
- "AND manualid = 0;");
+ "AND manualid = 0 AND c.xmltvid != '';");
query.bindValue(":SRCID", fromfile_id);
if (query.exec() && query.next())

0 comments on commit a98783e

Please sign in to comment.