[mythtv-users] Custom recording rule - how to not record

Ismo Tanskanen ismot at telemail.fi
Wed Mar 31 18:12:00 UTC 2010


Ismo Tanskanen wrote:
> I have custom recording rule what records music shows:
>
> program.title LIKE '%black sabbath%' OR program.title LIKE '%deep
> purple%' OR program.title LIKE '%led zeppelin%' OR
> program.description
> LIKE '%black sabbath%' OR program.description LIKE '%deep purple%'
> OR
> program.description LIKE '%led zeppelin%'
>
> But I don't want record "The Osbournes" what comes out almost every
> night. It's description talks about "Black Sabbath" and of cource is
> included to upcoming records.
>
> How I can exclude this show? I tried to add this after sql command:
>
> AND program.title <> 'The Osbournes'
>
> AND program.title NOT LIKE '%osbournes%'
>
> but neither of those works.

You will probably need brackets round the ... OR ... list, something
like:

( program.title LIKE '%black sabbath%'
OR program.title LIKE '%deep purple%'
OR program.title LIKE '%led zeppelin%'
OR program.description LIKE '%black sabbath%'
OR program.description LIKE '%deep purple%'
OR program.description LIKE '%led zeppelin%'
)
AND
(
program.title <> 'The Osbournes'
AND program.title NOT LIKE '%osbournes%'
)

This is because AND evaluates before OR.

The 2nd set of brackets (around the AND list) isn't strictly
necessary, but helps to clarify the order of evaluation to the
(human) reader.

I find it easier to set up separate searches for individual bands,
as these get very unwieldy if you have a wide range of tastes.

I would also possibly include the "subtitle" column in your query as
well, as some series may match that (e.g. the excellent Classic
Albums series has subtitles like "Deep Purple - Machine Head", "Iron
Maiden - Number of the Beast" etc). I often include band member
names in my rules as well.

For each new rule, I use the "Japan" template to create a new rule
and change Japan to whatever suits me.

Can I also say, as an aside, that I totally agree with your includes
list and your excludes list above!
-- 
Mike Holden

http://www.by-ang.com - the place to shop
for all manner of hand crafted items,
including Jewellery, Greetings Cards and Gifts


_______________________________________________
mythtv-users mailing list
mythtv-users
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Thanks Mike,

It didn't come into my mind that I need brackets.. but of cource it is
obvious.

Cool to know that there is still peoples who understands great music :)

- Kane



More information about the mythtv-users mailing list