[mythtv] problem with delete button "Yes, but record..." missing
Chris Pinkham
cpinkham at bc2va.org
Thu Feb 12 00:09:07 EST 2004
I think this snippet of code will get it back working correctly
(except for the kFindOneRecord which I think has an unintended
effect but still works the way it did before the duplicates patch).
bool ProgramInfo::IsSameProgram(const ProgramInfo& other) const
{
if ((title != other.title) ||
(dupmethod & kDupCheckNone))
return false;
if (rectype == kFindOneRecord)
return true;
if ((((dupmethod & kDupCheckSub) &&
(subtitle.length() > 2) &&
(subtitle == other.subtitle)) ||
(~dupmethod & kDupCheckSub)) &&
(((dupmethod & kDupCheckDesc) &&
(description.length() > 2) &&
(description == other.description)) ||
(~dupmethod & kDupCheckDesc)))
return true;
else
return false;
}
So...
Return FALSE if titles are unequal or dupmethod == NONE.
Return TRUE if kFindOneRecord (original code did this but I don't
know if this check needs to be here at all.
Return TRUE if (we're checking subtitles and they match (ie, nonempty)
or we're not checking) AND (we're checking descriptions and they
match or we're not checking).
Bruce, can you comment on the kFindOneRecord since you added that
new recording type?
> It was supposed to compare a program to itself. That way it could
> correctly decide to show the button or not depending on whether or not
> it matched itself according to the dupmethod. I have in my program list
> a program that doesn't seem to work as expected. I'm going to play with
> it later this week and see what's happening. Maybe some variable isn't
> getting set correctly or something weird. I had to mess around with a
> number of different files to get that to work. I might have missed
> something.
>
> Joel Feenstra
>
> Bruce Markey wrote:
> > Dave Alden wrote:
> > ...
> >
> >> With that said, I don't see why that would cause the "Yes, but record
> >> this
> >> episode again next time" button to not show up???
> >
> >
> > Right, back on topic to your question...
> >
> > This button removes the entry from the the 'oldrecorded' table
> > so that future showings won't be excluded as duplicates. If
> > there is no subtitle and no description, there no point in
> > including the button because it couldn't be matched anyway.
> > Until last week, duplicates had to have both sub and desc so
> > there was no reason to have the button if either was blank.
> > Now that there are different ways to match, this probably
> > needed to be changed. It was changed from:
> >
> > (program->subtitle != "" && program->description != ""))
> >
> > to
> > (program->IsSameProgram(*program)))
> >
> > But it's not clear to me what this is supposed to compare.
> > I do see the button for some recordings with sub and desc but
> > not for others.
> >
> > I think the old version could be changed from "&&" to "||" so
> > that the button would appear if there is either a sub or desc
> > since any of the duplicate methods could be used in the future.
> >
> > -- bjm
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > mythtv-dev mailing list
> > mythtv-dev at mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
>
> --===============2090674403==
> Content-Type: text/plain; charset="iso-8859-1"
> MIME-Version: 1.0
> Content-Transfer-Encoding: quoted-printable
> Content-Disposition: inline
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
> --===============2090674403==--
>
--
Chris
More information about the mythtv-dev
mailing list