[mythtv] RFC: Program table change timestamp

Chase Douglas chasedouglas.lists at gmail.com
Sat Apr 18 23:59:56 UTC 2009


I've been contemplating changes to MyMote (an iPhone remote for MythTV  
with a program guide) to make the program guide retrieval more  
efficient. I would really like to be able to have the iPhone cache all  
the program data on the device instead of requesting data on every  
launch only to forget about when the MyMote closes. Apple provides  
sqlite support, and a very nice looking API for managing data with  
sqlite as the backing store.

Caching all the program guide information on the device shouldn't be  
too hard, but I'm afraid that data import will take too long. I  
personally have standard analog cable + free OTA digital channels, so  
I have about 80-90 channels. My program table currently has 50,483  
rows in it. Syncing the program table to the device will be  
inefficient. However, most of the rows are static. If I sync the table  
today, and sync again tomorrow, it's likely that <10% of the rows will  
have changed. It would be nice if I could just sync the rows that have  
changed. However, I currently have no way of making this determination.

I propose that a column be added to the program table of type datetime  
that would hold a timestamp for when the row was last changed. This  
should be enough to reach my goal outlined above. The iPhone can  
assume that any programs ending more than 24 hrs ago (or however long  
ago you want) can be purged.

If I get positive feedback I will try to implement this myself. I  
assume the mythconverg initialization script and mythfilldatabase will  
need to be updated, but please provide any further details of other  
areas that would need changing.

Thanks,
Chase Douglas


More information about the mythtv-dev mailing list