On 05/12/05, MythTV <[EMAIL PROTECTED]> wrote:
> This patch computes the (time-weighted) average of the stored recordings
> and uses that bitrate, giving a better estimate of the number of hours of
> disk space left.
>
Can the calculation not be pushed down to the database? Makes for a
smaller resultset. This is the query I use in my own script:
SELECT sum(filesize) AS totbytes,
sum( ((unix_timestamp(endtime)
- unix_timestamp(starttime))/3600) ) AS totlen
FROM recorded
And you might even be able to push the rest of the calculation down as
well, so that you get back the bitrate itself.
--
aaron
"Oh oh oh. I'm incoherent with excitement. Please tell me what fascinating
bit of badger-spewtumly inconsequential trivia you will assail me with next."
-- Arthur Dent
_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev