[mythtv] Recordings Sports Feature Wish/Development

Michael Rice mikerice1969 at gmail.com
Thu Feb 21 16:27:03 UTC 2008


On 2/21/08, David Engel <david at istwok.net> wrote:
> On Wed, Feb 20, 2008 at 11:01:51AM -0800, Michael Rice wrote:
> > This query:
> >
> >       $qry = "SELECT * FROM record WHERE recordid = $recordid";
> >
> > needs to be changed to find the correct override for $recordid.  I am
> > thinking something like:
> >
> >       select * from record where programid = $programid and parentid =
> > $recordid;
> >
> > and if that is empty then use the original.  I'll work on it and see
> > how it works.  No more games to try it on tonight.
>
> That could work.  Don't you still have the new recordid from when the
> override was created?  You could just use that with the first query.

I don't think I have that info.  It doesn't seem to keep any state
information like this.  That's probably intentional since otherwise
you would have problems with recordings that had overrides added by
the user directly.  It does something like:

while (1) {
  recs = getRecordingsEndingSoon()
  foreach rec in recs
    recrule = getRecRuleForRecording(rec)
    updateOrCreateOverrideForRecRule(recrule)
  endforeach
  sleep
}

The games I was using all have programids but I suppose that isn't
always the case and something like starttime and chanid should be used
instead.


More information about the mythtv-dev mailing list