Opened 14 years ago

Closed 4 years ago

#10046 closed Patch - Bug Fix (Trac EOL)

Channel insert/updates now strip off leading/trailing whitespace in callsign and name

Reported by: Jerry Rubinow <jerrymr@…> 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)

libmythtv.patch (3.2 KB ) - added by Jerry Rubinow <jerrymr@…> 14 years ago.
patch for files in libmythtv
channeldata.patch (887 bytes ) - added by Jerry Rubinow <jerrymr@…> 14 years ago.
patch for files in mythfilldatabase
mythtv.patch (4.6 KB ) - added by Jerry Rubinow <jerrymr@…> 14 years ago.
mythweb.patch (1.1 KB ) - added by Jerry Rubinow <jerrymr@…> 14 years ago.

Download all attachments as: .zip

Change History (12)

by Jerry Rubinow <jerrymr@…>, 14 years ago

Attachment: libmythtv.patch added

patch for files in libmythtv

by Jerry Rubinow <jerrymr@…>, 14 years ago

Attachment: channeldata.patch added

patch for files in mythfilldatabase

comment:1 by Jerry Rubinow <jerrymr@…>, 14 years ago

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 by Jerry Rubinow <jerrymr@…>, 14 years ago

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.

by Jerry Rubinow <jerrymr@…>, 14 years ago

Attachment: mythtv.patch added

by Jerry Rubinow <jerrymr@…>, 14 years ago

Attachment: mythweb.patch added

comment:3 by sphery, 14 years ago

Owner: set to sphery
Status: newaccepted

comment:4 by Karl Dietz <dekarl@…>, 10 years ago

In d847d55f18315175d6f8b46f821e936d459ebd9d/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:5 by Karl Dietz <dekarl@…>, 10 years ago

In fdc94ef2465f0b596bd785dd9d39029c811f1ec6/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:6 by Karl Dietz <dekarl@…>, 10 years ago

In aba4858bd6b3f9abe9ba19adf8c833ba37150d61/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:7 by Stuart Auchterlonie, 5 years ago

Milestone: unknownneeds_triage

comment:8 by Stuart Auchterlonie, 4 years ago

Resolution: Trac EOL
Status: acceptedclosed

We have moved all bug tracking to github [1]

If you continue to have this issue, please open a new issue at github, referencing this ticket.

[1] - https://github.com/MythTV/mythtv/issues

Note: See TracTickets for help on using tickets.