Modify

Ticket #5195 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Mythweb uses removed commfree field from channel table

Reported by: janne Owned by: kormoc
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

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

Change History

comment:1 Changed 4 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 4 years ago by sphery <mtdean@…>

comment:2 Changed 4 years ago by kormoc

  • Owner changed from xris to kormoc
  • Status changed from new to accepted

comment:3 Changed 4 years ago by kormoc

  • Status changed from accepted to closed
  • Resolution set to fixed

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

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.