Skip to content

Commit

Permalink
Improve check for whether mythfilldatabase inserted data.
Browse files Browse the repository at this point in the history
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
dekarl authored and sphery committed Dec 6, 2011
1 parent 474da62 commit a98783e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions mythtv/programs/mythfilldatabase/filldata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions mythtv/programs/mythfilldatabase/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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())
Expand Down

0 comments on commit a98783e

Please sign in to comment.