[mythtv] Improving manual recordings

David Engel david at istwok.net
Mon Oct 3 20:41:26 UTC 2022


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.

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
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list