[mythtv-users] Customizing a recording rule

Stephen Worthington stephen_agent at jsw.gen.nz
Fri May 27 17:30:53 UTC 2016


On Fri, 27 May 2016 09:57:17 -0700, you wrote:

>On Thu, May 26, 2016 at 10:54 PM, Stephen Worthington
><stephen_agent at jsw.gen.nz> wrote:
>> On Thu, 26 May 2016 17:05:37 -0700, you wrote:
>>
>>>It's not currently showing on the channel I want to record off of.
>>>And, I guess because the shows I want to skip are in Spanish, they are
>>>not recognized as having been previously recorded.
>>
>> In that case, the only way I know of to fix the recording rule is to
>> use direct SQL on it in the database.  I have had to do that once or
>> twice.  The record.chanid and record.station fields need to be set
>> respectively to the channel.chanid and channel.station fields of the
>> channel you want.  Then you can go to the rule in mythfrontend and set
>> the "This channel only" option and it should work.

>I had already set it to this channel only.  I updated the fields
>without apparent effect on what was recorded; then, from the GUI, I
>took off the channel filter, saved the rule, then put the channel
>filter back on, and saved the rule.  And now it is ignoring the other
>channels, which is what I wanted .  Yay!  And thank you.

Because you had not changed the channel using the GUI, MythTV did not
know about the updated database row.  By using the GUI to change the
rule and then back again, you forced it to see the changes and act on
them (by running the scheduler).  Alternatively, you could run the
command "mythyutil --resched" to force the scheduler to be run.  That
problem was why I said to use the GUI to add the channel filter after
using SQL to make the changes.

>I still wonder, in general, if I want to add some SQL conditions to an
>existing rule, is there a way to do it?

Yes, that is what Custom Edit is all about.  It creates "Power" rules
that can have arbitrary SQL in them.  When looking at the record
table, "Power" rules have the SQL stored in the description column
instead of the normal description data.

>BTW, the previous answers include an implicit answer to my question
>about which table has the recording rules: it's "record."  The
>presence of start and end times led me to think that table had the
>results of what was recorded.  That seems to be in "recorded" for
>stuff available to watch and "oldrecorded" for stuff already recorded,
>viewed, and deleted.  I imagine this description is only approximately
>correct (e.g., oldrecorded includes entries for episodes that were
>never recorded because of conflicts).  See, e.g.,
>https://www.mythtv.org/wiki/Record_table for more authoritative
>accounts of tables.
>
>Ross

You have those tables pretty right.  Oldrecorded has some strange
uses, so you see future recordings in it also, but can filter them out
using the "future" column.  And do not forget the recordedprogram
table which has more data about a recorded programme.


More information about the mythtv-users mailing list