Opened 13 years ago
Closed 3 years ago
#10046 closed Patch - Bug Fix (Trac EOL)
Channel insert/updates now strip off leading/trailing whitespace in callsign and name
Reported by: | Owned by: | sphery | |
---|---|---|---|
Priority: | minor | Milestone: | needs_triage |
Component: | MythTV - General | Version: | Master Head |
Severity: | medium | Keywords: | database channel callsign |
Cc: | Ticket locked: | no |
Description
Modified places where channels are inserted or updated in the database to call QString::trimmed() on channel callsign and name. This prevents some potential mismatches when guide information is merged (i.e. one input has a channel with callsign "WABC" and tuner 2 has the same channel but the callsign is "WABC ", so they show up separately in the guide).
The patch modifies mfdb/channeldata.cpp, libmythtv/channelutil.cpp, libmythtv/datadirect.cpp, and libmythtv/tv_rec.cpp. This is my first patch submission, let me know if I made any mistakes in protocol. And please direct me to any other places that need modification which I missed. Finally, I verified successful compilation, but I'm unable to test.
Attachments (4)
Change History (12)
Changed 13 years ago by
Attachment: | libmythtv.patch added |
---|
comment:1 Changed 13 years ago by
Now I'm able to test, and mythtv-setup doesn't seem to use the update method in channelutil.cpp. I'll update the ticket when I have something usable, but don't waste time trying to use it in the meantime.
comment:2 Changed 13 years ago by
Here's is an updated and tested patch which trims callsign, channel number, and channel name in libmythtv/channelsettings.cpp, libmythtv/channelutil.cpp, libmythtv/tv_rec.cpp, and in mythweb in modules/tv/set_channels.php. I've verified the changes work correctly in the mythtv-setup channel editor, when using 'e' in the program guide, and in mythweb.
It seems like there's an extra place in the code that modifies the channel table which doesn't have a corresponding channel editor I was able to find. Also, I found two more places in the code, in mythfilldatabase and in libmythtv/datadirect.cpp, which update the channel table. I wasn't sure if these places should trim as well. They are currently unmodified.
These two patches (one for master, one for mythweb) supplant the earlier attachments.
Changed 13 years ago by
Attachment: | mythtv.patch added |
---|
Changed 13 years ago by
Attachment: | mythweb.patch added |
---|
comment:3 Changed 13 years ago by
Owner: | set to sphery |
---|---|
Status: | new → accepted |
comment:7 Changed 5 years ago by
Milestone: | unknown → needs_triage |
---|
patch for files in libmythtv