Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Users

Help With Custom Record Rule Syntax

 

 

MythTV users RSS feed   Index | Next | Previous | View Threaded


drew at mykitchentable

Mar 8, 2008, 11:17 AM

Post #1 of 4 (634 views)
Permalink
Help With Custom Record Rule Syntax

I am currently using 0.20.2 from Gentoo's portage system. The system
status screen shows the Myth version as "0.20.20070821-1".

Back some time ago, Bruce Markey posted an idea for a custom recording
rule marked as 'inactive' to alert one to upcoming new shows. My
version of the rule is this:

HOUR(program.starttime) >= 19

AND
HOUR(program.starttime) < 23

AND
program.previouslyshown = 0

AND
channel.callsign IN ("KCRA", "KQCA", "KXTV", "KOVR", "KMAX", "KXTL")

AND
((program.title LIKE '%Pilot%'
OR program.subtitle LIKE '%Pilot%'
OR program.description LIKE '%Pilot%')
OR
(program.title LIKE '%Premiere%'
OR program.subtitle LIKE '%Premiere%'
OR program.description LIKE '%Premiere%'))

As I recall, this used to work. But then I realized that I wasn't
seeing some of the new spring series so I started investigating. I
found that within the mythfrontend custom rule interface, clicking the
"Test" button returns "No listings found for this program".

Next I tried the query using MySQL directly. This query produced 4
results. The specific SQL and results are posted here:

http://drew.mykitchentable.net/Temp/query1.html

It appears the different results between the frontend and directly
accessing MySQL are because the frontend only shows results newer than
"now".

After some poking around, I found that removing the 'channel.callsign
IN' line returns results when testing from mythfrontend returns 15
results. I don't know of a good way to post those. However the results
of a direct MySQL query are posted here:

http://drew.mykitchentable.net/Temp/query2.html

The intent of the line "AND channel.callsign IN ("KCRA", "KQCA", "KXTV",
"KOVR", "KMAX", "KXTL")" is to limit the results to the regular network
stations I receive in my area. I don't want to know about "pilots" or
"premieres" of reruns on the many other stations I receive via DirecTV.
What is the correct SQL statement to limit these results?

Thanks for your help,

Drew

--
Be a Great Magician!
Visit The Alchemist's Warehouse

http://www.alchemistswarehouse.com

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


mtdean at thirdcontact

Mar 8, 2008, 1:05 PM

Post #2 of 4 (581 views)
Permalink
Re: Help With Custom Record Rule Syntax [In reply to]

On 03/08/2008 02:17 PM, Drew Tomlinson wrote:
> I am currently using 0.20.2 from Gentoo's portage system. The system
> status screen shows the Myth version as "0.20.20070821-1".
>
> Back some time ago, Bruce Markey posted an idea for a custom recording
> rule marked as 'inactive' to alert one to upcoming new shows. My
> version of the rule is this:
>
...
> AND
> channel.callsign IN ("KCRA", "KQCA", "KXTV", "KOVR", "KMAX", "KXTL")
>

Your output shows KTXL, not KXTL, though the others from KCRA and KMAX
should show (at least in the direct query). Note that the only ones
that occur in the future are on KTXL, so... Note, also, you're not
including KTXLDT or KCRADT or KMAXDT.

> AND
> ((program.title LIKE '%Pilot%'
> OR program.subtitle LIKE '%Pilot%'
> OR program.description LIKE '%Pilot%')
> OR
> (program.title LIKE '%Premiere%'
> OR program.subtitle LIKE '%Premiere%'
> OR program.description LIKE '%Premiere%'))

Unrelated to the problem you're seeing, but--since you are most likely
using Schedules Direct--why aren't you using the example "first
episodes" clause?

AND program.programid LIKE 'EP%0001'
AND program.originalairdate = DATE(program.starttime)

Though the example in in 0.20-fixes is:

program.previouslyshown = 0
AND program.first > 0
AND program.programid LIKE 'EP%0001'
AND DAYOFYEAR(program.originalairdate) =
DAYOFYEAR(program.starttime)

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


drew at mykitchentable

Mar 8, 2008, 2:11 PM

Post #3 of 4 (578 views)
Permalink
Re: Help With Custom Record Rule Syntax [In reply to]

Michael T. Dean wrote:
> On 03/08/2008 02:17 PM, Drew Tomlinson wrote:
>
>> I am currently using 0.20.2 from Gentoo's portage system. The system
>> status screen shows the Myth version as "0.20.20070821-1".
>>
>> Back some time ago, Bruce Markey posted an idea for a custom recording
>> rule marked as 'inactive' to alert one to upcoming new shows. My
>> version of the rule is this:
>>
>>
> ...
>
>> AND
>> channel.callsign IN ("KCRA", "KQCA", "KXTV", "KOVR", "KMAX", "KXTL")
>>
>>
>
> Your output shows KTXL, not KXTL, though the others from KCRA and KMAX
> should show (at least in the direct query). Note that the only ones
> that occur in the future are on KTXL, so... Note, also, you're not
> including KTXLDT or KCRADT or KMAXDT.
>

Oh, whoops! I don't know how many times I "verified" that the callsigns
were correct. Thanks for catching my error. This was driving me nuts!

The *DT are intentionally excluded because they are 4:3 digital channels
that carry the same programming as the non DT counterparts that
broadcast in 16:9. However thanks for pointing that out.

>> AND
>> ((program.title LIKE '%Pilot%'
>> OR program.subtitle LIKE '%Pilot%'
>> OR program.description LIKE '%Pilot%')
>> OR
>> (program.title LIKE '%Premiere%'
>> OR program.subtitle LIKE '%Premiere%'
>> OR program.description LIKE '%Premiere%'))
>>
>
> Unrelated to the problem you're seeing, but--since you are most likely
> using Schedules Direct--why aren't you using the example "first
> episodes" clause?
>
> AND program.programid LIKE 'EP%0001'
> AND program.originalairdate = DATE(program.starttime)
>
> Though the example in in 0.20-fixes is:
>
> program.previouslyshown = 0
> AND program.first > 0
> AND program.programid LIKE 'EP%0001'
> AND DAYOFYEAR(program.originalairdate) =
> DAYOFYEAR(program.starttime)

I am using Schedules Direct however I added this rule several years ago
before SD existed. I was probably still using 0.17. At that time the
example didn't exist in mythfrontend and the one discussed on this list
was more like mine as I recall. I'm no SQL expert but I suspect the new
example is more efficient. I will check it out.

Thanks for your help,

Drew

--
Be a Great Magician!
Visit The Alchemist's Warehouse

http://www.alchemistswarehouse.com

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


mtdean at thirdcontact

Mar 8, 2008, 2:59 PM

Post #4 of 4 (579 views)
Permalink
Re: Help With Custom Record Rule Syntax [In reply to]

On 03/08/2008 05:11 PM, Drew Tomlinson wrote:
> Michael T. Dean wrote:
>
>> On 03/08/2008 02:17 PM, Drew Tomlinson wrote:
>>> I am currently using 0.20.2 from Gentoo's portage system. The system
>>> status screen shows the Myth version as "0.20.20070821-1".
>>>
>>> Back some time ago, Bruce Markey posted an idea for a custom recording
>>> rule marked as 'inactive' to alert one to upcoming new shows. My
>>> version of the rule is this:
>> ...
>>
>>
>>> AND
>>> channel.callsign IN ("KCRA", "KQCA", "KXTV", "KOVR", "KMAX", "KXTL")
>> Your output shows KTXL, not KXTL, though the others from KCRA and KMAX
>> should show (at least in the direct query). Note that the only ones
>> that occur in the future are on KTXL, so... Note, also, you're not
>> including KTXLDT or KCRADT or KMAXDT.
> Oh, whoops! I don't know how many times I "verified" that the callsigns
> were correct. Thanks for catching my error. This was driving me nuts!
>

Sometimes it just takes a fresh pair of eyes.

>> Unrelated to the problem you're seeing, but--since you are most likely
>> using Schedules Direct--why aren't you using the example "first
>> episodes" clause?
> I am using Schedules Direct however I added this rule several years ago
> before SD existed. I was probably still using 0.17. At that time the
> example didn't exist in mythfrontend and the one discussed on this list
> was more like mine as I recall. I'm no SQL expert but I suspect the new
> example is more efficient. I will check it out.
And, probably more likely to work well with SD data. I'd recommend
using the one from trunk/0.21-fixes (the shorter of the two). It's
working great for me. You could always just wait until you upgrade to
0.21 (as soon as the packages are available for your distro) if you
don't want to type it in.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

MythTV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.