[mythtv] Improving manual recordings

David Engel david at istwok.net
Mon Oct 3 21:34:40 UTC 2022


On Mon, Oct 03, 2022 at 05:16:47PM -0400, Scott Theisen wrote:
> 
> 
> On 10/3/22 16:41, David Engel wrote:
> > On Tue, Sep 27, 2022 at 10:11:23AM -0400, Scott Theisen wrote:
> > > On 9/26/22 21:51, David Engel wrote:
> > > > I'll have to review your patch.  ENOTIME right now to do a thorough
> > > > enough job but I did realize removing the "(Manual Record)" bit was
> > > > not as easy as I'd hoped it was.
> > > > 
> > > > David
> > > Thinking on it a little more, I think this way is better:
> > > ```
> > > diff --git a/mythtv/programs/mythbackend/scheduler.cpp
> > > b/mythtv/programs/mythbackend/scheduler.cpp
> > > index 5d8a529dfc..fd2a322a06 100644
> > > --- a/mythtv/programs/mythbackend/scheduler.cpp
> > > +++ b/mythtv/programs/mythbackend/scheduler.cpp
> > > @@ -3698,6 +3698,16 @@ void Scheduler::UpdateManuals(uint recordid)
> > > 
> > >       RecordingType rectype = RecordingType(query.value(0).toInt());
> > >       QString title = query.value(1).toString();
> > > +    {
> > > +        // match suffix to ProgramInfo manual recording constructor
> > > +        QString suffix = " (" + QObject::tr("Manual Record") + ')';
> > > +        // corner case: user changed language between creating rule and
> > > now,
> > > +        // don't chop the end in that case
> > > +        if (title.endsWith(suffix))
> > > +        {
> > > +            title.chop(suffix.size());
> > > +        }
> > > +    }
> > >       QString subtitle = query.value(2).toString();
> > >       QString description = query.value(3).toString();
> > >       QString station = query.value(4).toString();
> > > ```
> > > 
> > > It has the same effect and is more correct in my opinion, even if it is more
> > > computationally intensive.  It is also clearer what it is chopping.
> > Sorry for the slow response.  Last week turned into a rather hectic week.
> > 
> > I'm going to veto this patch and anything similar to it.  While it
> > will likely work for the basic case of recording, there are enough
> > enough other cases (e.g duplicate checking, override recordings,
> > reactivation, change ending time, etc.) that I'm not confident in.
> 
> Manual recordings are excluded from duplicate checking: https://github.com/MythTV/mythtv/blob/167e016e38b30fb2984e1959dc323bbdaea30468/mythtv/programs/mythfrontend/manualschedule.cpp#L214

The scheduler performs its own form of duplicate checking while a
program is recording and when one is stopped early.

> What do you mean by "override recordings"?

Override rules -- don't record and record with override settings.

> I will perform some tests with overlapping manual recordings. Stopping the
> recordings early worked fine from what I remember. I'll also test two
> identically named recording rules with different lengths, with one canceled.
> 
> You can't change the end time (or the start time) after creating a manual
> recording rule, except by adjusting the start early and end late times. 
> Unless you were talking about something else?

The ending time can be changed while a program is recording.  Programs
can also be restarted either manually or automatically due to crashes
either with the normal end time or another one for that recording.

> > If there is very strong support from others that something must be
> > done, I would reluctantly accept the original suggestion to simply
> > dropt the manual recording tag everywhere.  See my next reply for
> > another, albeit larger, change.
> > 
> > David
> 
> If you are referring to adding a ruletitle column to the record table, that
> is not something I am looking at tackling, since that would require MySQL
> changes and I am not familiar with MySQL.

Yes.  This would be a good, simple task in which to learn.  I didn't
know SQL when I started working on MythTV, either.  Learing it turned
out to be very good for my career too. :)

David
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list