[mythtv] A little bit of work on the mythfilldatabase refreshing
behaviour?
Christian Weeks
christian.weeks at rogers.com
Tue Jun 8 03:01:13 EDT 2004
Hi there,
I'm a great fan of mythtv- having used it constantly for the last 9
months or so. I recently cut over to the new datadirect service and
noticed, as others have, that I was getting gaps in my schedule :( The
latest patch really didn't fix it, because it looks like not all
schedules are released at the same time- so some of my favourite
channels persist in being missing until the day before when the final
refresh happens :( I guess this is going to be an ongoing issue, since
it is probably undefined when exactly the data is released to
datadirect). I think that Matt's debian patches may also be affecting
this though I am not currently home to verify that.
Now, being a bit of a DB freak (I work for Oracle ;) and wanting to
contribute something I figured I could work out a way to make the
mythfilldatabase refreshing algorithm a bit smarter. Attached is my
first attempt. Basically, instead of just counting shows, this script
adds up the time of all the shows in the database for a particular day,
and then spits out the channels which are short (<86400 seconds). It
functions fine with my mysql (v 4.0.18- debian testing ?) and cleaned
up most of my problems with partial days of data in no time. It appears
to be smart enough not to refresh a full day's data too- mostly :)
Additionally, this approach gives more possibilities: I can
potentially, by altering the having clause, and adding a column to the
channel table, support a kind of "preference". The preference in this
case being a refresh weighting: a way to weight favourite channels
higher for refresh considerations (and non-favourites lower). This means
I could control the refresh decision, assuming missing data, based on
these choices.
Anyway, I thought I'd share my first foray into this and let you more
experienced developers chew on it if you wish...
Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mychanges.diff
Type: text/x-patch
Size: 2717 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040608/2a39221c/mychanges.bin
More information about the mythtv-dev
mailing list