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

David Shay david at shay.net
Thu Aug 2 05:15:04 UTC 2007


On 8/1/07, David Shay <david at shay.net> wrote:
> Bruce,
>
> In doing work on the chanid duplication detection, I came across
> something that doesn't seem right that perhaps you can clarify.
> Somewhere along the way (I think around changeset 7429?), findid
> started to get populated for all rules, not just find rules.  It looks
> like with some date value based on the start date of the recording.
>
> So, I recently set up 3 recordings in a test.  2 of those were for the
> same show on different chanid's, 1 was for a different show
> altogether.  All 3, however, had the same findid, I believe because
> they have the same startdate.
>
> 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.
>
> Should this findid check be limited to certain find rules?  Am I
> missing something in this analysis?
>
Sorry to answer my own post, but let me make sure I have this right.
Further debugging revealed that at least when being called by the
scheduler, for "normal" non-find rules, the value within the function
was always "0" for findid.  This seems to trace back to the SQL Case
statement in the BUSQ in scheduler.cpp, where if it's not
findone,findweekly, finddaily, or override, then it sets findid to 0
regardless of what's in the record table.  Is that right?

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.


More information about the mythtv-dev mailing list