[mythtv-commits] Ticket #3966: TVRec::CheckChannelPrefix erroneously detecting channels with underscore spacer
MythTV
mythtv at cvs.mythtv.org
Thu Sep 13 20:28:21 UTC 2007
#3966: TVRec::CheckChannelPrefix erroneously detecting channels with underscore
spacer
-------------------------------------------------------+--------------------
Reporter: Tom Dexter <digitalaudiorock at hotmail.com> | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: 0.20-fixes
Severity: medium | Mlocked: 0
-------------------------------------------------------+--------------------
When CheckChannelPrefix in libs/libmythtv/tv_rec.cpp checks for channels
using the various spacers ("", "_", "-", "#", ".") it can erroneously find
channels matching the underscore ("_") as it's a SQL wildcard character.
I noticed that, for example, when I enter '51' on my remote, it gets
changes to 5_1 even though I'm using '.' (5.1 for example) in all my
channel numbers.
I tried to address this by changing the following line:
QString qprefix = add_spacer(prefix, spacers[j]);
...to:
QString qprefix = add_spacer(prefix, spacers[j] == "_" ? "\\_" :
spacers[j]);
...to force the underscore to be escaped. This stopped it from adding the
underscore separator, but for some reason, did not get it to use the '.'
separator. I can't figure out why not, as it appears the SQL would find
channels usging (for example) LIKE '5.%'.
--
Ticket URL: <http://svn.mythtv.org/trac/ticket/3966>
MythTV <http://svn.mythtv.org/trac>
MythTV
More information about the mythtv-commits
mailing list