[mythtv-users] Possible MythWeb bug: When using a power search recording rule, ability to not record certain matches fails

Bruce Markey bjm at lvcm.com
Sun Oct 9 20:20:19 UTC 2005


Derek Battams wrote:
> Quoting Bruce Markey <bjm at lvcm.com>:
> 
>> Michael T. Dean wrote:
>>
>>> Nick wrote:
>>>
>>>> Only noticed today when I set up a rule for the remaining Formula 1
>>>> races (I have a friend trackside for both upcoming races).
>>>>
>>>> I set up the rule on a frontend and it worked a treat, picking out all
>>>> the matching programs as I'd expect. There are several repeats (a
>>>> repeat of the race at a more civilised hour for those starting very
>>>> early, the repeated highlights, and then the whole race repeated later
>>>> in the week.
>>>>
>>>> I almost always use the MythWeb interface to control my recordings, so
>>>> when I went to manually cancel the extra showing I didn't want
>>>> recorded, nothing seemed to change, and the showings were still set to
>>>> record.
>>>>
>>> MythWeb does not (yet) support custom record rules.  You have two 
>>> options when using MythWeb for scheduling:  1)  patch it yourself to 
>>> support custom record, or 2) remember your custom record rules, identify
>>
>>
>> All of the search types store the search info in the string for
>> 'record.description'. Most likely, mythweb is replacing that with the
>> description of the current showing when a change is made. If so, this
>> would also be a problem when making changes to Title or Keyword or
>> People rules too. Someone with PHP chops may want to fix this.
>>
>> Also, the underlying functionality to allow unlimited search capabilities
>> is record.search=1 (kPowerSearch) which takes the SQL in the description
>> into the queries in the scheduler. Search Words->Advanced uses this as
>> does Custom Record. Custom Record is just a minimal wrapper interface
>> to help users build valid kPowerSearch rules. It should be possible
>> to build an even better interface from mythweb using HTML forms. Text
>> entry would be more natural, there would be more room for explanations
>> and examples and so on. Nigel at one time suggested an interface like
>> Mozilla's mail filters where you set criteria a line at a time and
>> click "More" to add another criteria. Each clause that needs data
>> could have a widget for whatever data it needs like a spinbox for
>> a list of numbers like hour 0-23, a dropdown for a list of strings
>> like category_type, or a text entry box for a title. This may be an
>> interesting and worthwhile project for someone who wants to contribute
>> their PHP skills.
>>
>> --  bjm
> 
> 
> It just so happens I'm tackling this issue right now.  And my initial 
> thought was to do exactly what you're talking about with the HTML 
> forms.  I was going to have drop downs for the selection lists (time, 
> category, etc.) and text fields for the titles, subtitles, etc.  Then 
> you'd be able to add a line at a time (like you describe with the 'more' 
> button).  But as I got ready to implement a UI for this it became 
> increasingly clear that by adding all the nice UI features it would be 
> extremely difficult to provide the flexibility, that I feel is required, 
> for the power search facility.
> 
> You mentioned the Mozilla mail filters so I loaded up Thunderbird (I 
> assume it's the same?) to look at the UI and it does everything except 
> for one glaring limitation.  The rules that you created, line by line, 
> are either all 'ORed' or 'ANDed' together.  It's one or the other, which 
> makes their UI fairly easy to implement (take the created rules one by 
> one and slap an 'AND' or 'OR' between each of them and run it).  The 

Correct. That is a limitation. Not only that they are all either
'ORed' or 'ANDed' together but that parenthesizing would be difficult.
Also, some of the Custom Record examples have two or more tweakable
fields. It would also need to have an example clause for every possible
database column for the relevant tables. I think any interface that
doesn't allow directly editing the SQL would limit the possibilities.
Custom Record started out as just a text box to cut'n'paste from
Emacs then the example clauses evolved to avoid having to type
everything and/or using an external editor.

> reason I started tackling this was that I needed a rather complicated 
> search rule for Jon Stewart and realized that power search would be nice 
> to have via the web.  This is the rule I need:
> 
> program.title = "The Daily Show With Jon Stewart" AND 
> ((DAYOFWEEK(program.starttime) >= 2 AND DAYOFWEEK(program.starttime) <= 
> 5 AND (HOUR(program.starttime) = 23 OR HOUR(program.starttime) = 0)) OR 
> (DAYOFWEEK(program.starttime) = 6 AND HOUR(program.starttime) = 0))

I'll accept this as an example of something hard to do in a UI but
not as a good way to record TDS =).

> As you can see, a simple 'AND all rules' or 'OR all rules' doesn't cut 
> it in this case.  And I suspect this to be the case for many people's 
> power search rules.  I came to the conclusion that it'd be much easier 
> to just provide the text area box for people to type in their queries 
> (as they do in the frontend) so as to provide the most flexibility 
> possible.

Agreed. You may want to take this into consideration. Many useful
things are possible with simple clauses; "PGA Golf" but not on The
Golf Channel, Celebreality shows but only on Sunday, for the Tour
de France "Bicycle Racing" but only before 8am. Maybe it would be
useful to start as a simple point'n'click pre-fabricated clauses UI
for the squeamish but have a button to expose the raw text editing
for the power users.

>   Of course, this also gets my power search web facility up and 
> running much quicker, which was also a major influence on my decision.  
> As I think about it even more, the time required to implement a point 
> and click HTML based facility to implement just the rule I have above 
> would be very long and difficult, but I'd gladly entertain ideas if 
> people have them.

Even if the interface was the same as custom record, text entry at
a keyboard in front of a web browser would be easier than the remote
control line edit mode for mythfrontend with the cell phone style
number keys.

--  bjm


More information about the mythtv-users mailing list