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
Change History
Note: See
TracTickets for help on using
tickets.

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).