diff --git a/mythtv/programs/mythfilldatabase/main.cpp b/mythtv/programs/mythfilldatabase/main.cpp index 99cfccaa3c9..938a33e13ea 100644 --- a/mythtv/programs/mythfilldatabase/main.cpp +++ b/mythtv/programs/mythfilldatabase/main.cpp @@ -595,9 +595,10 @@ int main(int argc, char *argv[]) } } int found = query.size(); - query.prepare("SELECT MIN(starttime),title,subtitle,description " + query.prepare("SELECT MIN(starttime),title,subtitle," + " LEFT(description, 1024) AS partdesc " "FROM program WHERE programid = '' " - "GROUP BY title,subtitle,description;"); + "GROUP BY title,subtitle,partdesc;"); if (query.exec()) { while(query.next()) @@ -606,11 +607,11 @@ int main(int argc, char *argv[]) "WHERE starttime = :STARTTIME " " AND title = :TITLE " " AND subtitle = :SUBTITLE " - " AND description = :DESCRIPTION"); + " AND LEFT(description, 1024) = :PARTDESC"); updt.bindValue(":STARTTIME", query.value(0).toDateTime()); updt.bindValue(":TITLE", query.value(1).toString()); updt.bindValue(":SUBTITLE", query.value(2).toString()); - updt.bindValue(":DESCRIPTION", query.value(3).toString()); + updt.bindValue(":PARTDESC", query.value(3).toString()); if (!updt.exec()) MythDB::DBError("Marking first showings", updt); } @@ -635,9 +636,10 @@ int main(int argc, char *argv[]) } } found = query.size(); - query.prepare("SELECT MAX(starttime),title,subtitle,description " + query.prepare("SELECT MAX(starttime),title,subtitle," + " LEFT(description, 1024) AS partdesc " "FROM program WHERE programid = '' " - "GROUP BY title,subtitle,description;"); + "GROUP BY title,subtitle,partdesc;"); if (query.exec()) { while(query.next()) @@ -646,11 +648,11 @@ int main(int argc, char *argv[]) "WHERE starttime = :STARTTIME " " AND title = :TITLE " " AND subtitle = :SUBTITLE " - " AND description = :DESCRIPTION"); + " AND LEFT(description, 1024) = :PARTDESC"); updt.bindValue(":STARTTIME", query.value(0).toDateTime()); updt.bindValue(":TITLE", query.value(1).toString()); updt.bindValue(":SUBTITLE", query.value(2).toString()); - updt.bindValue(":DESCRIPTION", query.value(3).toString()); + updt.bindValue(":PARTDESC", query.value(3).toString()); if (!updt.exec()) MythDB::DBError("Marking last showings", updt); }