[mythtv-users] Premieres rule

Brian J. Murrell brian at interlinx.bc.ca
Tue Jul 13 13:07:12 UTC 2010

I'm using a search of the form:

SELECT program.chanid, program.title, program.subtitle, program.starttime FROM program
    LEFT JOIN record as r ON program.title = r.title AND program.subtitle = r.subtitle
    WHERE r.title IS NULL AND program.starttime > NOW() AND program.first > 0
        AND program.programid LIKE "EP%0001" AND program.originalairdate = DATE(program.starttime)
    ORDER BY program.starttime, program.title

to find "premiere" episodes that I've not scheduled for recording.  I've
found a problem with it though in that it didn't find a particular
premiere episode, so I queried the database to see why: 

mysql> select title,programid,starttime,originalairdate from program where programid LIKE "EP%0001" and title = "Hot in Cleveland";
| title            | programid      | starttime           | originalairdate |
| Hot in Cleveland | EP012599310001 | 2010-07-05 20:00:00 | 2010-06-16      |
| Hot in Cleveland | EP012599310001 | 2010-07-05 20:00:00 | 2010-06-16      |
| Hot in Cleveland | EP012599310001 | 2010-07-10 19:30:00 | 2010-06-16      |
| Hot in Cleveland | EP012599310001 | 2010-07-10 17:30:00 | 2010-06-16      |
4 rows in set (12.72 sec)

As can be seen, it aired after it's originalairdate.  :-(

Since I do this search daily and I keep a history of the searches, I
searched through all of June to see if this was ever matching and it
never did, so I can only assume that for whatever reason, the actual air
date of the premiere episode(s) was delayed from it's original air date.

I tried removing the

program.originalairdate = DATE(program.starttime)

condition but way too many false positives came up.

Any ideas?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://mythtv.org/pipermail/mythtv-users/attachments/20100713/5bf05120/attachment.pgp>

More information about the mythtv-users mailing list