Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#9850 closed Developer Task (Fixed)

Update mythweb to support new recording rule filters

Reported by: gigem Owned by: xris
Priority: minor Milestone: unknown
Component: Plugin - MythWeb Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description (last modified by gigem)

Mythweb needs to allow editing of the record.filter column. record.filter is a bit mask where each bit corresponds to a filter. If the bit for a filter is set, the corresponding filter is enabled for the recording rule and if the bit is cleared, the filter is disabled. Currently, only 12 filters are allowed, corresponding to bits 0-11. More filters might be allowed in the future.

The filters themselves are defined in the recordfilter table. The relevant columns are defined as follows:

recordfilter.filterid: This is the unique identifier for the filter. It is currently restricted to values 0-11. The corresponding bit in record.filter is (1 << recordfilter.filterid).

recordfilter.description: This is a short description of the filter. It should be shown to the user when editing the record.filter bit for the filter.

recordfilter.clause: This is the snippet of SQL that is used when the filter is enabled. If this entry is empty, the filter is not available for use and the record.filter bit for this filter should not be editable.

recordfilter.newruledefault: This is a flag which determines the initial state of the filter for new recording rules. If this entry is non-zero, the record.filter bit for this filter should initially be set, otherwise, the bit should initially be cleared.

When creating an override recording rule, the record.filter value of the new rule should be set to the same value as the parent rule. In addition, the record.filter value for override recording rules should not be editable by the user.

After support for editing record.filter is completed, the support for the "Exclude Repeat Episodes", "Exclude Generic Episodes" and "Exclude Repeat and Generic Episodes" options in record.dupin should be removed.

Attachments (2)

filters.diff (10.5 KB) - added by Doug Haber <doug@…> 8 years ago.
This patch adds record filter functionality to mythweb as described above. Please give me any feedback/changes etc. Thanks!
filters.2.diff (9.1 KB) - added by Doug Haber <doug@…> 8 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 8 years ago by gigem

Description: modified (diff)

comment:2 Changed 8 years ago by Github

Remove support for old recording rule filters in frontend and backend.

Any rules using the old filters for "Exclude Old Episodes", "Exclude unidentified episodes" and "Record new episode first showings" are automatically converted to the new style. Also add a new "This Episode" filter to make it easier to match a specific episode.

Refs #9850.

Branch: master Changeset: 71064a30ef0106ba2d92512645bbdba031b75928

Changed 8 years ago by Doug Haber <doug@…>

Attachment: filters.diff added

This patch adds record filter functionality to mythweb as described above. Please give me any feedback/changes etc. Thanks!

Changed 8 years ago by Doug Haber <doug@…>

Attachment: filters.2.diff added

comment:3 Changed 8 years ago by Doug Haber <doug@…>

Attached an updated patch that doesn't remove the "New Episodes Only" feature

comment:4 Changed 7 years ago by xris

Owner: changed from Rob Smith to xris
Status: newassigned

Applied the first patch. "new episodes only" is included in the new filters code.

comment:5 Changed 7 years ago by xris

Resolution: Fixed
Status: assignedclosed

comment:6 Changed 7 years ago by xris

Typo in my commit message didn't get the github comment added here. Here's a link:

https://github.com/MythTV/mythweb/commit/bfb69bef8b5923c421cf327d7944ea4590441046

Note: See TracTickets for help on using tickets.