[mythtv] findid for non-find rules, IsSameProgram checks (help Bruce!)

David Shay david at shay.net
Fri Aug 3 02:14:27 UTC 2007

On 8/2/07, David Engel <david at istwok.net> wrote:
> On Wed, Aug 01, 2007 at 11:39:43PM -0500, David Shay wrote:
> > All of that is fine (maybe?), but then in IsSameProgram, I think there
> > might be a problem.  There are 3 checks, then a check for title.  If
> > it makes it past this logic, as long as the findid's match,
> > IsSameProgram return's true (line 1393 of programinfo.cpp).  This is
> > before it does any duplicate checking based on subtitle, etc.  This
> > just doesn't seem right to me. It would seem that two programs with
> > different subtitles but the same findid would return true to
> > IsSameProgram.
> It's a bug.  I have a patch lying around somewhere to address this
> problem.  It sets the parentid equal to the recordid in the scheduler
> if it's not already set.  The findid check can then be qualified by
> parentid != 0 and parentid == other.parentid.  This change also
> simplifies some other code which conditionally uses parentid or
> recordid -- it can unconditionally use parentid.
> I wasn't sure of the full implications of the change, mainly on
> mythweb so I set it aside and haven't gotten back to it yet.
> On Thu, Aug 02, 2007 at 12:15:04AM -0500, David Shay wrote:
> > Also, further work on the chanid duplicate detection seems to have
> > revealed that I don't even have to touch the BUSQ, as long as I put
> > the appropriate detection in IsSameProgram.  That actually seems to
> > make this A Whole Lot Easier than I thought it might be.  In fact, I
> > think I've got it about 80% working.
> Are you sure about that?  I believe changing IsSameProgram will handle
> the case where both recordings can be done at the same time.  I'm not
> sure it will if conflicts force one to a later time.  In that case, I
> think the presence of the earlier recording in the oldrecorded or
> recorded table will result in the latter being treated as a duplicate.

No, I wasn't sure about it.  That was the next case, which, following
every normal 80-20 rule, will take the next 80% of the work, since you
are correct, IsSameProgram only solves half the battle.  It's pretty
obvious why, now that I look at it, since I think the query just
matches on programid automatically.  Oh well, I thought going into
this that I'd have to do something to that query....

More information about the mythtv-dev mailing list