Somewhere between version 0.16 and version 0.17 the code for the
--no-delete option to mythfilldatabase was changed. The use of the
no_delete variable was inverted in one of the if() statements.
The first of the two attached patches (mythfilldatabase.patch1.diff)
fixes this. Without the fix there are thousands of sql insert errors
and the database ends up with overlapping programs. It might have
been changed this way for a reason rather than in error, in that case
you might want to consider making this code run for both options.
The second patch (mythfilldatabase.patch2.diff) corrects a minor error
in the checking for unchanged programs. The sql statement to check
for an unchanged program doesn't use .utf8() on some of the arguments
that the insert sql statement does. This might lead to some changes
being identified when the database is identical.
--- /home/amb/mythtv/v0.17/mythtv-0.17/programs/mythfilldatabase/filldata.cpp~
2005-02-09 21:35:13.000000000 +0000
+++ /home/amb/mythtv/v0.17/mythtv-0.17/programs/mythfilldatabase/filldata.cpp
2005-02-27 08:59:13.000000000 +0000
@@ -2279,7 +2279,7 @@
continue;
}
- if (!no_delete)
+ if (no_delete)
{
query.prepare("SELECT title,starttime,endtime FROM program
WHERE "
"chanid=:CHANID AND starttime>=:START AND "
--- /home/amb/mythtv/v0.17/mythtv-0.17/programs/mythfilldatabase/filldata.cpp~
2005-02-09 21:35:13.000000000 +0000
+++ /home/amb/mythtv/v0.17/mythtv-0.17/programs/mythfilldatabase/filldata.cpp
2005-02-27 08:59:13.000000000 +0000
@@ -2256,8 +2256,8 @@
query.bindValue(":DESC", (*i).desc.utf8());
query.bindValue(":CATEGORY", (*i).category.utf8());
query.bindValue(":CATEGORY_TYPE", (*i).catType.utf8());
- query.bindValue(":AIRDATE", (*i).airdate);
- query.bindValue(":STARS", (*i).stars);
+ query.bindValue(":AIRDATE", (*i).airdate.utf8());
+ query.bindValue(":STARS", (*i).stars.utf8());
query.bindValue(":PREVIOUSLYSHOWN", (*i).previouslyshown);
query.bindValue(":TITLE_PRONOUNCE", (*i).title_pronounce.utf8());
query.bindValue(":STEREO", (*i).stereo);
--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop [EMAIL PROTECTED]
http://www.gedanken.demon.co.uk/
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev