[mythtv-users] New Custom Record

Brad Templeton brad+myth at templetons.com
Tue Dec 14 21:06:34 UTC 2004

On Tue, Dec 14, 2004 at 12:23:32PM -0800, nate s wrote:
> That sounds to me like a great idea.  I've been wanting the exact same
> thing myself, and have been considering how to impliment it (not being
> a dev)  I was thinking about writhing a script to mess with the
> database to show that specific episodes are the same, or something. 
> If there were native support for something like this, that'd be great.

That's barely even a script, and I must admit while kludgey it's a good

For example, if they all aired on the same day (not true for daily
show) then something like this would be in order.

    UPDATE 'program'
	SET subtitle = Concat("Program for ", date(starttime))
    where 'title' = "The Daily Show" AND
    subtitle = "A humourous slant on top news stories";

To firm this up, you would have it do two updates.  One would take
episodes where HOUR(TIME(starttime) >= 18, and the other where they
are less than 18, and the one for less than 18 would modify the
subtitle to include the prior day (dateadd should work).

I'm not an SQL wizard, so this is just a quick guess, but it
would look something like this.   If you ran this after a database
fill you would not get repeats.  I will let an SQL wizard refine
the statement if they like.

You could just feed this to the mysql program -- no coding (outside of
SQL) required.

However, this is a very specific solution, you need a line like this
for every code, though it would not be hard to generalize it with
fancier SQL to detect shows that are on multiple times a day with the
same description, and stuff the date into the description as shown

More information about the mythtv-users mailing list