[mythtv-users] A workaround for the "Daily Show" and other repeats problems

Brad Templeton brad+myth at templetons.com
Sun Jan 2 19:45:15 EST 2005


As many people know, the Daily Show runs several times a day, all
repeating the episode that airs earlier at 11pm the day before.  The
listing data is often not filled it, often it is just a stock line
about "A humorous take on today's news stories."

Thus Myth (and Tivo and others) don't know how to handle it.  They can
either treat all the shows as repeats or all as new, which is not waht
you want.  You end up needing to do a manual timeslot setting for each
day.


I have worked a kludge up to fix this, though I have not tested it long
term.   The following mysql script will find the entries with the
dummy description, and add a subtitle for the correct air date.

You would run it by putting it in "fixdailyshow" and saying:

	mysql mythconverg -u mythtv -p password <fixdailshow

You could run this once a day from cron, or after you run mythfilldatabse.

However, it won't be perfect yet.  First of all, during repeat weeks, it
will give the shows unique identifiers, and so you will record the
repeats if they have the dummy description.  Fortunately they often get
a real description when they are repeats, but you might still record them
if you never saw this description.

Secondly, when the Daily Show _does_ have a description, it's pretty simple.
I have not tested if, when it says "Senator John McCain", that
anything differs from the other times they have had him on the show so
that Myth knows to record the new one.  If this happens, we could modify
the script to stick dates even on the valid descriptons.

The technique I apply could be used on any other show that has no
description but repeats multiple times a day or week.   Let me know
how it works for you.  Perhaps if these work we could add a patch to
mythfilldatabase to have it invoke post-processing scripts like
this.

------------------------------------------

# Feed this to stdin on "mysql mythconverg"
# We make changes in the 'program' table

# first we fake out the monday repeats of Thursday
    UPDATE program
          SET subtitle = 
# We set them back 3.83 days to match Thursday
		    DATE_FORMAT(DATE_SUB(starttime, INTERVAL "3 20" DAY_HOUR), 
			    "%M %D, %Y")
	      where title = "The Daily Show With Jon Stewart" AND
		  subtitle = "" AND
		  WEEKDAY(DATE_SUB(starttime, INTERVAL 20 HOUR)) = 6 AND
	          description = "A humorous slant on top news stories.";


# Now we apply the real change


  UPDATE program
# We change the subtitle to the main date, which is the date 20 hours
# prior to air.  Thus the 11pm Airing matches the real date, the 7pm
# airing gets yesterday's date and the 1am airing also get's the prior
# days date
          SET subtitle = 
		    DATE_FORMAT(DATE_SUB(starttime, INTERVAL 20 HOUR), 
			    "%M %D, %Y")
# we only do this when the subtitle was blank and the description
# matches the generic description.  Thus we don't repeat ourselves
	      where title = "The Daily Show With Jon Stewart" AND
		  subtitle = "" AND
	          description = "A humorous slant on top news stories.";





More information about the mythtv-users mailing list