Ticket #11638: duplicate_algorithm_20130702.diff

File duplicate_algorithm_20130702.diff, 2.7 KB (added by lomion0815@…, 11 years ago)
  • mythtv/libs/libmyth/programinfo.cpp

    diff --git a/mythtv/libs/libmyth/programinfo.cpp b/mythtv/libs/libmyth/programinfo.cpp
    index f444b44..2fb65d0 100644
    a b bool ProgramInfo::IsSameProgram(const ProgramInfo& other) const 
    19821982    if ((dupmethod & kDupCheckSubThenDesc) &&
    19831983        ((subtitle.isEmpty() &&
    19841984          ((!other.subtitle.isEmpty() &&
    1985             description.compare(other.subtitle, Qt::CaseInsensitive) != 0) ||
     1985            description.left(other.subtitle.length()).compare(other.subtitle, Qt::CaseInsensitive) != 0) ||
    19861986           (other.subtitle.isEmpty() &&
    19871987            description.compare(other.description, Qt::CaseInsensitive) != 0))) ||
    19881988         (!subtitle.isEmpty() &&
    19891989          ((other.subtitle.isEmpty() &&
    1990             subtitle.compare(other.description, Qt::CaseInsensitive) != 0) ||
     1990            subtitle.compare(other.description.left(subtitle.length()), Qt::CaseInsensitive) != 0) ||
    19911991           (!other.subtitle.isEmpty() &&
    19921992            subtitle.compare(other.subtitle, Qt::CaseInsensitive) != 0)))))
    19931993        return false;
  • mythtv/programs/mythbackend/scheduler.cpp

    diff --git a/mythtv/programs/mythbackend/scheduler.cpp b/mythtv/programs/mythbackend/scheduler.cpp
    index 575fbce..59d5206 100644
    a b void Scheduler::UpdateDuplicates(void) 
    37783778"          (p.subtitle <> '' AND "
    37793779"             (p.subtitle = oldrecorded.subtitle OR "
    37803780"              (oldrecorded.subtitle = '' AND "
    3781 "               p.subtitle = oldrecorded.description))) OR "
     3781"               p.subtitle = LEFT(oldrecorded.description,CHAR_LENGTH(p.subtitle))))) OR "
    37823782"          (p.subtitle = '' AND p.description <> '' AND "
    3783 "             (p.description = oldrecorded.subtitle OR "
     3783"             (LEFT(p.description,CHAR_LENGTH(oldrecorded.subtitle)) = oldrecorded.subtitle OR "
    37843784"              (oldrecorded.subtitle = '' AND "
    37853785"               p.description = oldrecorded.description)))) "
    37863786"      ) "
    void Scheduler::UpdateDuplicates(void) 
    38163816"          (p.subtitle <> '' AND "
    38173817"             (p.subtitle = recorded.subtitle OR "
    38183818"              (recorded.subtitle = '' AND "
    3819 "               p.subtitle = recorded.description))) OR "
     3819"               p.subtitle = LEFT(recorded.description,CHAR_LENGTH(p.subtitle))))) OR "
    38203820"          (p.subtitle = '' AND p.description <> '' AND "
    3821 "             (p.description = recorded.subtitle OR "
     3821"             (LEFT(p.description,CHAR_LENGTH(recorded.subtitle)) = recorded.subtitle OR "
    38223822"              (recorded.subtitle = '' AND "
    38233823"               p.description = recorded.description)))) "
    38243824"      ) "