Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Enhanced "Subtitle then Description" duplicate checking.

Some EIT providers reportedly put the subtitle in the description
field in some situations.  This change extends the "Subtitle then
Description" logic to account for it.  Based on a patch from
lomion0815.

Fixes #9985.
  • Loading branch information...
commit a42bfc612f8ccd0b15bc2474ae27d53f33ba6dda 1 parent 546e752
@gigem gigem authored
View
14 mythtv/libs/libmyth/programinfo.cpp
@@ -1893,10 +1893,16 @@ bool ProgramInfo::IsSameProgram(const ProgramInfo& other) const
return false;
if ((dupmethod & kDupCheckSubThenDesc) &&
- ((subtitle.isEmpty() && other.subtitle.isEmpty() &&
- description.toLower() != other.description.toLower()) ||
- (subtitle.toLower() != other.subtitle.toLower()) ||
- (description.isEmpty() && subtitle.isEmpty())))
+ ((subtitle.isEmpty() &&
+ ((!other.subtitle.isEmpty() &&
+ description.toLower() != other.subtitle.toLower()) ||
+ (other.subtitle.isEmpty() &&
+ description.toLower() != other.description.toLower()))) ||
+ (!subtitle.isEmpty() &&
+ ((other.subtitle.isEmpty() &&
+ subtitle.toLower() != other.description.toLower()) ||
+ (!other.subtitle.isEmpty() &&
+ subtitle.toLower() != other.subtitle.toLower())))))
return false;
return true;
View
26 mythtv/programs/mythbackend/scheduler.cpp
@@ -3684,10 +3684,15 @@ void Scheduler::AddNewRecords(void)
" (((RECTABLE.dupmethod & 0x04) = 0) OR (program.description <> '' "
" AND program.description = oldrecorded.description)) "
" AND "
-" (((RECTABLE.dupmethod & 0x08) = 0) OR (program.subtitle <> '' "
-" AND program.subtitle = oldrecorded.subtitle) OR (program.subtitle = '' "
-" AND oldrecorded.subtitle = '' AND program.description <> '' "
-" AND program.description = oldrecorded.description)) "
+" (((RECTABLE.dupmethod & 0x08) = 0) OR "
+" (program.subtitle <> '' AND "
+" (program.subtitle = oldrecorded.subtitle OR "
+" (oldrecorded.subtitle = '' AND "
+" program.subtitle = oldrecorded.description))) OR "
+" (program.subtitle = '' AND program.description <> '' AND "
+" (program.description = oldrecorded.subtitle OR "
+" (oldrecorded.subtitle = '' AND "
+" program.description = oldrecorded.description)))) "
" ) "
" ) "
" ) "
@@ -3716,10 +3721,15 @@ void Scheduler::AddNewRecords(void)
" (((RECTABLE.dupmethod & 0x04) = 0) OR (program.description <> '' "
" AND program.description = recorded.description)) "
" AND "
-" (((RECTABLE.dupmethod & 0x08) = 0) OR (program.subtitle <> '' "
-" AND program.subtitle = recorded.subtitle) OR (program.subtitle = '' "
-" AND recorded.subtitle = '' AND program.description <> '' "
-" AND program.description = recorded.description)) "
+" (((RECTABLE.dupmethod & 0x08) = 0) OR "
+" (program.subtitle <> '' AND "
+" (program.subtitle = recorded.subtitle OR "
+" (recorded.subtitle = '' AND "
+" program.subtitle = recorded.description))) OR "
+" (program.subtitle = '' AND program.description <> '' AND "
+" (program.description = recorded.subtitle OR "
+" (recorded.subtitle = '' AND "
+" program.description = recorded.description)))) "
" ) "
" ) "
" ) "
Please sign in to comment.
Something went wrong with that request. Please try again.