Opened 18 years ago
Closed 18 years ago
#911 closed patch (fixed)
Case Insensitve subtitle matching of duplicates
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
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)
Change History (5)
Changed 18 years ago by
Attachment: | subtitle_lowercase.patch added |
---|
comment:1 Changed 18 years ago by
Type: | defect → patch |
---|
comment:2 Changed 18 years ago by
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 18 years ago by
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:
http://dev.mysql.com/doc/refman/5.0/en/case-sensitivity.html
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 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(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.
Patch