Opened 17 years ago

Closed 17 years ago

#911 closed patch (fixed)

Case Insensitve subtitle matching of duplicates

Reported by: stuart@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


Occassionally duplicates aren't matched because of minor case differences in the subtitle e.g. "Father Ted: Song for Europe" "Father Ted: Song For Europe"

The attached patch simple reduces subtitles to lower case when they are compared. I cannot see a downside to this, but it could be made optional?

The same could also be done for the description, although the possibility of two descriptions being identical except for case seems less likely.

Attachments (1)

subtitle_lowercase.patch (463 bytes) - added by stuart@… 17 years ago.

Download all attachments as: .zip

Change History (5)

Changed 17 years ago by stuart@…

Attachment: subtitle_lowercase.patch added


comment:1 Changed 17 years ago by anonymous

Type: defectpatch

comment:2 Changed 17 years ago by cpinkham

This patch by itself won't fix the issue because the scheduler itself still uses a case sensitive match against the recorded and oldrecorded tables. For the desired effect, you have to also modify the SQL in Scheduler::AddNewRecords?() need to use case insensitive matching for the joins between program and oldrecorded and the joins between program and recorded.

comment:3 Changed 17 years ago by stuart@…

By default MySQL comparisons are case-insensitive. Unless the column has been created with a case sensitive collation, which as far as I'm aware it hasn't. Or if the SELECT statement specifically states the collation type.

The following page of them manual explains better:

The only place I could find where the subtitle case sensitivity issue occured was in programinfo.cpp. I might have missed others - I had to grep the source to find the right place. This minor change seemed to work fine for me.

comment:4 Changed 17 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [8464]) I stand corrected. :) Since MySQL is using an insensitive matches in SQL queries, make ProgramInfo::IsSameProgram?() do the same for title, subtitle, and description. Patch for subtitle by Stuart Morgan. Title and description additions by me. Closes #911.

Note: See TracTickets for help on using tickets.