Opened 16 years ago

Closed 16 years ago

#5195 closed defect (fixed)

Mythweb uses removed commfree field from channel table

Reported by: Janne Grunau Owned by: Rob Smith
Priority: minor Milestone: 0.22
Component: mythweb Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The commfree was deprecated by the commmethod field long time ago.

I removed it from the database schema a while ago since it was scheduled for deletion after 0.21. I hadn't checked if it is still in use and was quite supprised when Greg told me that the channel editor in mythweb still uses it.

Attachments (1)

mythweb-5195-commfree_channels.patch (3.1 KB) - added by sphery <mtdean@…> 16 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 16 years ago by sphery <mtdean@…>

Simple patch modifies MythWeb's channel editor to properly set the commmethod to -2 when the commfree checkbox is checked.

Rather than add a drop-down list with available commercial detection methods (with values as in CommercialSkipMethod? in programs/mythfrontend/globalsettings.cpp and CommMethod? in libs/libmythtv/channelsettings.cpp )--including "Commercial Free"--this simply "repurposes" the checkbox to set the appropriate value in commmethod. This approach allows setting commercial free channels easily through the web interface.

If the ability to set a commercial detection method through MythWeb's channel editor is desirable (doing so would mean maintaining proper synchronization of the values in 3 places throughout Myth instead of just 2), it can be added as a new column offering all appropriate values except "Commercial Free." Then, the value for the commmethod drop down would be used unless the commfree checkbox is checked (which would override the value for commmethod).

Personally, I don't think an ability to set a per-channel commercial detection method through MythWeb is worth the maintenance (sync'ing values in 3 places). Users wanting per-channel commercial detection methods can specify them through mythtv-setup's channel editor.

This patch doesn't modify the program's usage of commfree, though--at first glance--that may be right as programinfo.cpp sets chancommfree based on the value of commmethod. It also doesn't modify the search portion of MythWeb (which probably does need fixing).

Changed 16 years ago by sphery <mtdean@…>

comment:2 Changed 16 years ago by Rob Smith

Owner: changed from xris to Rob Smith
Status: newaccepted

comment:3 Changed 16 years ago by Rob Smith

Resolution: fixed
Status: acceptedclosed

(In [17424]) Fixes #5195, this removes all uses of channel.commfree and replaces them with channel.commmethod, including searches.

Note: See TracTickets for help on using tickets.