[mythtv] RFC: Program table change timestamp

Chase Douglas chasedouglas.lists at gmail.com
Sun Apr 19 18:23:21 UTC 2009


On Apr 19, 2009, at 12:26 PM, George Nassas wrote:
> On 19-Apr-09, at 10:01 AM, Chase Douglas wrote:
>
>> have mythfilldatabase update program info instead of wiping  
>> everything clean
>
> That sounds hard to do since you can't be sure the fresh listings  
> will map to the same timeslots. For example, a two hour show might  
> be replaced by two one hour ones. I can imagine all sorts of  
> inconsistencies creeping in and a parade of angry people when their  
> shows don't record for some hard to understand reason. Wiping and  
> inserting avoids all that.
>
> Another approach could be to maintain your own version of the  
> schedule table inside mythconverg. You could add some sort of -- 
> postfetch option to mythfilldatabase to get it to fire off a script/ 
> program which would reconcile program updates with your version.
>
> Or, you could live with transferring all the new rows each time. A  
> normal fill run affects today, tomorrow and two weeks from now so  
> it's only 3 days of stuff.

I'm not sure how updating the programs would be different than wiping  
everything and starting over. However, I've decided that the easiest  
way to do this is to delete everything from the program table that  
doesn't match any of the programs fetched from the listings provider.  
Then, delete all the programs from the listings provider data that we  
already have correct info for. Finally, insert all that is left from  
the listings provider into the program table.

This is made easier by the fact that the listings data is inserted  
into the db as a temporary table. Two (possibly even one, still  
working on it) queries could do all the deletion from the program and  
the temporary listings table.


More information about the mythtv-dev mailing list