Skip to content

Commit

Permalink
Fix multiple database bindings issue in Scheduler::ResetDuplicates().
Browse files Browse the repository at this point in the history
This causesd the duplicate status of programs without programids or
findids to not get updated properly.

Fixes #11224
  • Loading branch information
gigem committed Nov 13, 2012
1 parent a1c4f4f commit 6a147ec
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions mythtv/programs/mythbackend/scheduler.cpp
Expand Up @@ -2041,16 +2041,18 @@ void Scheduler::ResetDuplicates(uint recordid, uint findid,
if (!subtitle.isEmpty())
{
// Need to check both for kDupCheckSubThenDesc
filterClause += "OR p.subtitle = :SUBTITLE "
"OR p.description = :SUBTITLE ";
bindings[":SUBTITLE"] = subtitle;
filterClause += "OR p.subtitle = :SUBTITLE1 "
"OR p.description = :SUBTITLE2 ";
bindings[":SUBTITLE1"] = subtitle;
bindings[":SUBTITLE2"] = subtitle;
}
if (!descrip.isEmpty())
{
// Need to check both for kDupCheckSubThenDesc
filterClause += "OR p.description = :DESCRIP "
"OR p.subtitle = :DESCRIP ";
bindings[":DESCRIP"] = descrip;
filterClause += "OR p.description = :DESCRIP1 "
"OR p.subtitle = :DESCRIP2 ";
bindings[":DESCRIP1"] = descrip;
bindings[":DESCRIP2"] = descrip;
}
if (!programid.isEmpty())
{
Expand Down

0 comments on commit 6a147ec

Please sign in to comment.