Mailing List Archive

Improving manual recordings
Hello all,

We primarily use manual recordings due to the poor US OTA EPG data.
There are a few things I would like to change or improve.

1. Restore date/time subtitle if subtitle is empty.
* I will be testing this over the next few days.
https://github.com/MythTV/mythtv/commit/a28191023de31e36efaf23a2d837b4b1725ec73b
claims
https://github.com/MythTV/mythtv/commit/5f6697ecfaf9bd7175aaf99b3ef07f884d5af65c
is at fault for this change.
2. As an option, or entirely, stop appending "(Manual Record)" to the
title of manual recordings.
* This would be easier to stop entirely, but I am open to keeping
it as an option.
* https://github.com/MythTV/mythtv/blob/06da3119d5a35af24df048d300f1240d48d9b3fb/mythtv/libs/libmyth/programinfo.cpp#L818
seems to be to blame for this, in my opinion annoying, behavior,
but I haven't yet tested changing it.
* I would keep the description still with "(Manual Record)".
3. Add the ability to set the subtitle when creating a manual recording
rule in mythfrontend.
* Would this require theme changes?
* I would also like to be able to add a counter to the subtitle,
but that will probably prove more involved that I want to do.
4. I'm not sure if this is easily possible, but I would like to be able
to return to the first screen to edit a recording rule's start time,
duration, title, etc instead of having to delete and create a whole
new rule.


Any thoughts or comments on these proposed changes would be appreciated,
especially on the last two.

Thanks,

Scott
Re: Improving manual recordings [ In reply to ]
On Sat, Sep 24, 2022 at 04:55:59PM -0400, Scott Theisen wrote:
> Hello all,
>
> We primarily use manual recordings due to the poor US OTA EPG data. There
> are a few things I would like to change or improve.
>
> 1. Restore date/time subtitle if subtitle is empty.
> * I will be testing this over the next few days.
> https://github.com/MythTV/mythtv/commit/a28191023de31e36efaf23a2d837b4b1725ec73b
> claims
> https://github.com/MythTV/mythtv/commit/5f6697ecfaf9bd7175aaf99b3ef07f884d5af65c
> is at fault for this change.

I expect John will jump in here.

> 2. As an option, or entirely, stop appending "(Manual Record)" to the
> title of manual recordings.
> * This would be easier to stop entirely, but I am open to keeping
> it as an option.
> * https://github.com/MythTV/mythtv/blob/06da3119d5a35af24df048d300f1240d48d9b3fb/mythtv/libs/libmyth/programinfo.cpp#L818
> seems to be to blame for this, in my opinion annoying, behavior,
> but I haven't yet tested changing it.
> * I would keep the description still with "(Manual Record)".

I prefer to keep "(Manual Record)" in the recording rule. I don't
have a problem with dropping it in the recordings it creates. Maybe
Prepend it to the subtitle of recordings if you add the date/time
back.

> 3. Add the ability to set the subtitle when creating a manual recording
> rule in mythfrontend.
> * Would this require theme changes?

Yes.

> * I would also like to be able to add a counter to the subtitle,
> but that will probably prove more involved that I want to do.

My opinion would depend on if and how it was implemented.

> 4. I'm not sure if this is easily possible, but I would like to be able
> to return to the first screen to edit a recording rule's start time,
> duration, title, etc instead of having to delete and create a whole
> new rule.

Might be simple. Might be hard. It depends on how the existing code
works which I haven't looked at in ages.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
On 9/25/22 15:07, David Engel wrote:
> On Sat, Sep 24, 2022 at 04:55:59PM -0400, Scott Theisen wrote:
>> Hello all,
>>
>> We primarily use manual recordings due to the poor US OTA EPG data. There
>> are a few things I would like to change or improve.
>>
>> 1. Restore date/time subtitle if subtitle is empty.
>> * I will be testing this over the next few days.
>> https://github.com/MythTV/mythtv/commit/a28191023de31e36efaf23a2d837b4b1725ec73b
>> claims
>> https://github.com/MythTV/mythtv/commit/5f6697ecfaf9bd7175aaf99b3ef07f884d5af65c
>> is at fault for this change.
> I expect John will jump in here.
>
>> 2. As an option, or entirely, stop appending "(Manual Record)" to the
>> title of manual recordings.
>> * This would be easier to stop entirely, but I am open to keeping
>> it as an option.
>> * https://github.com/MythTV/mythtv/blob/06da3119d5a35af24df048d300f1240d48d9b3fb/mythtv/libs/libmyth/programinfo.cpp#L818
>> seems to be to blame for this, in my opinion annoying, behavior,
>> but I haven't yet tested changing it.

It is that line.

>> * I would keep the description still with "(Manual Record)".
> I prefer to keep "(Manual Record)" in the recording rule. I don't
> have a problem with dropping it in the recordings it creates. Maybe
> Prepend it to the subtitle of recordings if you add the date/time
> back.

mythfrontend -> Manage Recordings -> Recording Rules only shows the
title.  "(Manual Record)" is a translated string, so removing it is
probably not as straightforward as not adding it.  It sounds like having
an option to append or not is desired, which leads to the question: How
do I add a new setting?

>> 3. Add the ability to set the subtitle when creating a manual recording
>> rule in mythfrontend.
>> * Would this require theme changes?
> Yes.

The question then becomes, which themes do I need to change?

Thanks,

Scott
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
On Sun, Sep 25, 2022 at 06:37:52PM -0400, Scott Theisen wrote:
> On 9/25/22 15:07, David Engel wrote:
> > On Sat, Sep 24, 2022 at 04:55:59PM -0400, Scott Theisen wrote:
> > > * I would keep the description still with "(Manual Record)".
> > I prefer to keep "(Manual Record)" in the recording rule. I don't
> > have a problem with dropping it in the recordings it creates. Maybe
> > Prepend it to the subtitle of recordings if you add the date/time
> > back.
>
> mythfrontend -> Manage Recordings -> Recording Rules only shows the title.?
> "(Manual Record)" is a translated string, so removing it is probably not as
> straightforward as not adding it.? It sounds like having an option to append
> or not is desired, which leads to the question: How do I add a new setting?

It's added progrmatically. It should be equally removed
programtically. I wouldn't worry about the corner case of the user
changing the preferred language after the manual, rule is created.

>
> > > 3. Add the ability to set the subtitle when creating a manual recording
> > > rule in mythfrontend.
> > > * Would this require theme changes?
> > Yes.
>
> The question then becomes, which themes do I need to change?

At a minimum, update all bundled themes yourself; provide ample notice
to the maintainers of all popular, external themes; and do something
reasonable if there is no subtitle element in the current theme.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
On 9/24/22 3:55PM, Scott Theisen wrote:
> Hello all,
>
> We primarily use manual recordings due to the poor US OTA EPG data. 
> There are a few things I would like to change or improve.
>
> 1. Restore date/time subtitle if subtitle is empty.
> * I will be testing this over the next few days.
> https://github.com/MythTV/mythtv/commit/a28191023de31e36efaf23a2d837b4b1725ec73b
> claims
> https://github.com/MythTV/mythtv/commit/5f6697ecfaf9bd7175aaf99b3ef07f884d5af65c
> is at fault for this change.
>
*Yes. Please implement this.*

I'm working on improvements to metadata collection which depend on
having the
date/time populated in the subtitle field when a real subtitle is not
available. Normally,
for Manual Record rules, there is no specified subtitle. The date/time
of the start of the
recording allows me to find a specific season, episode, subtitle, and
description, when
using TVmaze.com for the metadata source. This works for original
broadcasts, not
reruns, because the database only stores the original broadcast date and
time. The
TMDB3 metadata source doesn't support this because its API provides no
means to
find a specific episode based on date/time.

With all the extra information this process provides, I update the
season, episode,
subtitle, and description from such a metadata retrieval, and display
them to the
user in the front end.

> 1. As an option, or entirely, stop appending "(Manual Record)" to the
> title of manual recordings.
> * This would be easier to stop entirely, but I am open to
> keeping it as an option.
> * https://github.com/MythTV/mythtv/blob/06da3119d5a35af24df048d300f1240d48d9b3fb/mythtv/libs/libmyth/programinfo.cpp#L818
> seems to be to blame for this, in my opinion annoying,
> behavior, but I haven't yet tested changing it.
> * I would keep the description still with "(Manual Record)".
>

I have pending code which needs to handle the Description field differently
for an OTA Automatic Record rule and a Manual Record rule. I currently
check for "(Manual Record)" in the recording title to distinguish between
them. If you do remove that substring, then I'd have to find some other
way to accomplish this. Maybe add some sort of field in the *ProgramInfo*
class which would indicate that the program originated from a Manual Record
rule? Maybe the record_id value could be used to search for this
information?

I worry about a possible name collision in the Record Rules. For one
show, I have an Automatic Record rule set up for my OTA tuner, and a
Manual Record Rule set up for my Cable tuner.

Big Sky
Big Sky (Manual Record)

If you eliminate "(Manual Record)", those separate record rules will be
harder to
distinguish. It would still be functional but it would be less clear to
the user.


Steve Erlenborn

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums:https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
On 9/26/22 19:20, Steve Erlenborn wrote:
> On 9/24/22 3:55PM, Scott Theisen wrote:
>> Hello all,
>>
>> We primarily use manual recordings due to the poor US OTA EPG data. 
>> There are a few things I would like to change or improve.
>>
>> 1. Restore date/time subtitle if subtitle is empty.
>> * I will be testing this over the next few days.
>> https://github.com/MythTV/mythtv/commit/a28191023de31e36efaf23a2d837b4b1725ec73b
>> claims
>> https://github.com/MythTV/mythtv/commit/5f6697ecfaf9bd7175aaf99b3ef07f884d5af65c
>> is at fault for this change.
>>
> *Yes. Please implement this.*

That was easy, a quasi-one line fix:
```
diff --git a/mythtv/programs/mythbackend/scheduler.cpp
b/mythtv/programs/mythbackend/scheduler.cpp
index 9a1195da42..5d8a529dfc 100644
--- a/mythtv/programs/mythbackend/scheduler.cpp
+++ b/mythtv/programs/mythbackend/scheduler.cpp
@@ -3789,7 +3789,9 @@ void Scheduler::UpdateManuals(uint recordid)
             query.bindValue(":STARTTIME", startdt);
             query.bindValue(":ENDTIME", startdt.addSecs(duration));
             query.bindValue(":TITLE", title);
-            query.bindValue(":SUBTITLE", subtitle);
+            query.bindValue(":SUBTITLE",
+                            !subtitle.isEmpty() ? subtitle :
+                            MythDate::toString(startdt,
MythDate::kDatabase | MythDate::kOverrideLocal));
             query.bindValue(":DESCRIPTION", description);
             query.bindValue(":SEASON", season);
             query.bindValue(":EPISODE", episode);
```

This annoyed me because manual recordings used to have the date time
subtitle and I was counting on that for mythlink.pl with just the title
and subtitle.  It still works with no subtitle, but is not as optimal.

See https://github.com/MythTV/mythtv/pull/643

>
> I'm working on improvements to metadata collection which depend on
> having the
> date/time populated in the subtitle field when a real subtitle is not
> available. Normally,
> for Manual Record rules, there is no specified subtitle. The date/time
> of the start of the
> recording allows me to find a specific season, episode, subtitle, and
> description, when
> using TVmaze.com for the metadata source. This works for original
> broadcasts, not
> reruns, because the database only stores the original broadcast date
> and time. The
> TMDB3 metadata source doesn't support this because its API provides no
> means to
> find a specific episode based on date/time.
>
> With all the extra information this process provides, I update the
> season, episode,
> subtitle, and description from such a metadata retrieval, and display
> them to the
> user in the front end.
>
>> 1. As an option, or entirely, stop appending "(Manual Record)" to
>> the title of manual recordings.
>> * This would be easier to stop entirely, but I am open to
>> keeping it as an option.
>> * https://github.com/MythTV/mythtv/blob/06da3119d5a35af24df048d300f1240d48d9b3fb/mythtv/libs/libmyth/programinfo.cpp#L818
>> seems to be to blame for this, in my opinion annoying,
>> behavior, but I haven't yet tested changing it.
>> * I would keep the description still with "(Manual Record)".
>>
>
> I have pending code which needs to handle the Description field
> differently
> for an OTA Automatic Record rule and a Manual Record rule. I currently
> check for "(Manual Record)" in the recording title to distinguish between
> them. If you do remove that substring, then I'd have to find some other
> way to accomplish this. Maybe add some sort of field in the *ProgramInfo*
> class which would indicate that the program originated from a Manual
> Record
> rule? Maybe the record_id value could be used to search for this
> information?

I was planning on keeping the description as is so the user can
distinguish manual recordings.

>
> I worry about a possible name collision in the Record Rules. For one
> show, I have an Automatic Record rule set up for my OTA tuner, and a
> Manual Record Rule set up for my Cable tuner.
>
> Big Sky
> Big Sky (Manual Record)
>
> If you eliminate "(Manual Record)", those separate record rules will
> be harder to
> distinguish. It would still be functional but it would be less clear
> to the user.
>
>
> Steve Erlenborn

I'll look into David Engel's suggestion of trimming "(Manual Record)"
from the title instead of modifying the recording rule, as I initially
suggested.

My initial idea was easy, but appears to not work as well for others:
```
diff --git a/mythtv/libs/libmyth/programinfo.cpp
b/mythtv/libs/libmyth/programinfo.cpp
index 4d46b9d9f6..adfa8d05b1 100644
--- a/mythtv/libs/libmyth/programinfo.cpp
+++ b/mythtv/libs/libmyth/programinfo.cpp
@@ -815,7 +815,7 @@ ProgramInfo::ProgramInfo(const QString &_title, uint
_chanid,
             MythDate::toString(m_startTs, MythDate::kTime));
     }

-    m_description = m_title =
+    m_description =
         QString("%1 (%2)").arg(m_title, QObject::tr("Manual Record"));
     ensureSortFields();
 }
```

That ProgramInfo object is then used to construct a RecordingRule in
mythtv/programs/mythfrontend/manualschedule.cpp
ManualSchedule::recordClicked().

Regards,

Scott Theisen
Re: Improving manual recordings [ In reply to ]
On 9/26/22 16:27, David Engel wrote:
> On Sun, Sep 25, 2022 at 06:37:52PM -0400, Scott Theisen wrote:
>> On 9/25/22 15:07, David Engel wrote:
>>> On Sat, Sep 24, 2022 at 04:55:59PM -0400, Scott Theisen wrote:
>>>> * I would keep the description still with "(Manual Record)".
>>> I prefer to keep "(Manual Record)" in the recording rule. I don't
>>> have a problem with dropping it in the recordings it creates. Maybe
>>> Prepend it to the subtitle of recordings if you add the date/time
>>> back.
>> mythfrontend -> Manage Recordings -> Recording Rules only shows the title.
>> "(Manual Record)" is a translated string, so removing it is probably not as
>> straightforward as not adding it.  It sounds like having an option to append
>> or not is desired, which leads to the question: How do I add a new setting?
> It's added progrmatically. It should be equally removed
> programtically. I wouldn't worry about the corner case of the user
> changing the preferred language after the manual, rule is created.
>

What is the behavior of an empty title?

Ensuring that the title is non-empty, is straightforward so I decided to
do so and the entire title is still in the description if it was
accidentally truncated due to changing the language.

```
diff --git a/mythtv/programs/mythbackend/scheduler.cpp
b/mythtv/programs/mythbackend/scheduler.cpp
index 5d8a529dfc..1717242457 100644
--- a/mythtv/programs/mythbackend/scheduler.cpp
+++ b/mythtv/programs/mythbackend/scheduler.cpp
@@ -3698,6 +3698,17 @@ void Scheduler::UpdateManuals(uint recordid)

     RecordingType rectype = RecordingType(query.value(0).toInt());
     QString title = query.value(1).toString();
+    {
+        int chop_length = QObject::tr("Manual Record").size() + 3;
+        // + 3 for space, open, and close parentheses, see ProgramInfo
manual
+        // recording consturctor
+        // corner case: user changed language between creating rule and
now,
+        // don't chop the end if it would result in an empty string
+        if (title.size() > chop_length)
+        {
+            title.chop(chop_length);
+        }
+    }
     QString subtitle = query.value(2).toString();
     QString description = query.value(3).toString();
     QString station = query.value(4).toString();
```

This keeps "(Manual Record)" in the RecordingRule and shows as such in
mythfrontend -> Manage Recordings -> Recording Rules.

It is not present in the title in Upcoming Recordings but is still
present in the description.  The same for the actual recording, which is
as desired.

Regards,

Scott
Re: Improving manual recordings [ In reply to ]
On Mon, Sep 26, 2022 at 08:49:15PM -0400, Scott Theisen wrote:
> On 9/26/22 16:27, David Engel wrote:
> > On Sun, Sep 25, 2022 at 06:37:52PM -0400, Scott Theisen wrote:
> > > On 9/25/22 15:07, David Engel wrote:
> > > > On Sat, Sep 24, 2022 at 04:55:59PM -0400, Scott Theisen wrote:
> > > > > * I would keep the description still with "(Manual Record)".
> > > > I prefer to keep "(Manual Record)" in the recording rule. I don't
> > > > have a problem with dropping it in the recordings it creates. Maybe
> > > > Prepend it to the subtitle of recordings if you add the date/time
> > > > back.
> > > mythfrontend -> Manage Recordings -> Recording Rules only shows the title.
> > > "(Manual Record)" is a translated string, so removing it is probably not as
> > > straightforward as not adding it.? It sounds like having an option to append
> > > or not is desired, which leads to the question: How do I add a new setting?
> > It's added progrmatically. It should be equally removed
> > programtically. I wouldn't worry about the corner case of the user
> > changing the preferred language after the manual, rule is created.
> >
>
> What is the behavior of an empty title?
>
> Ensuring that the title is non-empty, is straightforward so I decided to do
> so and the entire title is still in the description if it was accidentally
> truncated due to changing the language.
>
> ```
> diff --git a/mythtv/programs/mythbackend/scheduler.cpp
> b/mythtv/programs/mythbackend/scheduler.cpp
> index 5d8a529dfc..1717242457 100644
> --- a/mythtv/programs/mythbackend/scheduler.cpp
> +++ b/mythtv/programs/mythbackend/scheduler.cpp
> @@ -3698,6 +3698,17 @@ void Scheduler::UpdateManuals(uint recordid)
>
> ???? RecordingType rectype = RecordingType(query.value(0).toInt());
> ???? QString title = query.value(1).toString();
> +??? {
> +??????? int chop_length = QObject::tr("Manual Record").size() + 3;
> +??????? // + 3 for space, open, and close parentheses, see ProgramInfo
> manual
> +??????? // recording consturctor
> +??????? // corner case: user changed language between creating rule and
> now,
> +??????? // don't chop the end if it would result in an empty string
> +??????? if (title.size() > chop_length)
> +??????? {
> +??????????? title.chop(chop_length);
> +??????? }
> +??? }
> ???? QString subtitle = query.value(2).toString();
> ???? QString description = query.value(3).toString();
> ???? QString station = query.value(4).toString();
> ```
>
> This keeps "(Manual Record)" in the RecordingRule and shows as such in
> mythfrontend -> Manage Recordings -> Recording Rules.
>
> It is not present in the title in Upcoming Recordings but is still present
> in the description.? The same for the actual recording, which is as desired.

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
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
On Mon, Sep 26, 2022 at 06:20:13PM -0500, Steve Erlenborn wrote:
> On 9/24/22 3:55PM, Scott Theisen wrote:
> I worry about a possible name collision in the Record Rules. For one
> show, I have an Automatic Record rule set up for my OTA tuner, and a
> Manual Record Rule set up for my Cable tuner.
>
> Big Sky
> Big Sky (Manual Record)
>
> If you eliminate "(Manual Record)", those separate record rules will be
> harder to
> distinguish. It would still be functional but it would be less clear to the
> user.

I don't think this should be a problem. Manual rules create
artificial programs with manualid = <rule-recordid>. Manual rules
only match programs with their own manualid and non-manual rules only
match programs where manualid = 0.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
On 9/26/22 21:51, David Engel wrote:
> On Mon, Sep 26, 2022 at 08:49:15PM -0400, Scott Theisen wrote:
>> On 9/26/22 16:27, David Engel wrote:
>>> On Sun, Sep 25, 2022 at 06:37:52PM -0400, Scott Theisen wrote:
>>>> On 9/25/22 15:07, David Engel wrote:
>>>>> On Sat, Sep 24, 2022 at 04:55:59PM -0400, Scott Theisen wrote:
>>>>>> * I would keep the description still with "(Manual Record)".
>>>>> I prefer to keep "(Manual Record)" in the recording rule. I don't
>>>>> have a problem with dropping it in the recordings it creates. Maybe
>>>>> Prepend it to the subtitle of recordings if you add the date/time
>>>>> back.
>>>> mythfrontend -> Manage Recordings -> Recording Rules only shows the title.
>>>> "(Manual Record)" is a translated string, so removing it is probably not as
>>>> straightforward as not adding it.  It sounds like having an option to append
>>>> or not is desired, which leads to the question: How do I add a new setting?
>>> It's added progrmatically. It should be equally removed
>>> programtically. I wouldn't worry about the corner case of the user
>>> changing the preferred language after the manual, rule is created.
>>>
>> What is the behavior of an empty title?
>>
>> Ensuring that the title is non-empty, is straightforward so I decided to do
>> so and the entire title is still in the description if it was accidentally
>> truncated due to changing the language.
>>
>> ```
>> diff --git a/mythtv/programs/mythbackend/scheduler.cpp
>> b/mythtv/programs/mythbackend/scheduler.cpp
>> index 5d8a529dfc..1717242457 100644
>> --- a/mythtv/programs/mythbackend/scheduler.cpp
>> +++ b/mythtv/programs/mythbackend/scheduler.cpp
>> @@ -3698,6 +3698,17 @@ void Scheduler::UpdateManuals(uint recordid)
>>
>>      RecordingType rectype = RecordingType(query.value(0).toInt());
>>      QString title = query.value(1).toString();
>> +    {
>> +        int chop_length = QObject::tr("Manual Record").size() + 3;
>> +        // + 3 for space, open, and close parentheses, see ProgramInfo
>> manual
>> +        // recording consturctor
>> +        // corner case: user changed language between creating rule and
>> now,
>> +        // don't chop the end if it would result in an empty string
>> +        if (title.size() > chop_length)
>> +        {
>> +            title.chop(chop_length);
>> +        }
>> +    }
>>      QString subtitle = query.value(2).toString();
>>      QString description = query.value(3).toString();
>>      QString station = query.value(4).toString();
>> ```
>>
>> This keeps "(Manual Record)" in the RecordingRule and shows as such in
>> mythfrontend -> Manage Recordings -> Recording Rules.
>>
>> It is not present in the title in Upcoming Recordings but is still present
>> in the description.  The same for the actual recording, which is as desired.
> 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.

Regards,

Scott
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
On 9/26/22 21:55, David Engel wrote:
> On Mon, Sep 26, 2022 at 06:20:13PM -0500, Steve Erlenborn wrote:
>> On 9/24/22 3:55PM, Scott Theisen wrote:
>> I worry about a possible name collision in the Record Rules. For one
>> show, I have an Automatic Record rule set up for my OTA tuner, and a
>> Manual Record Rule set up for my Cable tuner.
>>
>> Big Sky
>> Big Sky (Manual Record)
>>
>> If you eliminate "(Manual Record)", those separate record rules will be
>> harder to
>> distinguish. It would still be functional but it would be less clear to the
>> user.
> I don't think this should be a problem. Manual rules create
> artificial programs with manualid = <rule-recordid>. Manual rules
> only match programs with their own manualid and non-manual rules only
> match programs where manualid = 0.
>
> David

His point, I think, is that if we went with my first suggestion both
recording rules would be labeled only as "Big Sky" without anything to
differentiate them in mythfrontend -> Manage Recordings -> Recording Rules.

This is not an issue for my use case, which is why I didn't think of
that.  Trimming " (Manual Record)" after the fact is acceptable to me
and supports this mixed use case of manual and automatic rules with
otherwise the same title, by allowing the *user* to still easily
identify which kind of rule it is without requiring further changes.

Scott
Re: Improving manual recordings [ In reply to ]
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@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
On Tue, Sep 27, 2022 at 02:50:02PM -0400, Scott Theisen wrote:
> On 9/26/22 21:55, David Engel wrote:
> > On Mon, Sep 26, 2022 at 06:20:13PM -0500, Steve Erlenborn wrote:
> > > On 9/24/22 3:55PM, Scott Theisen wrote:
> > > I worry about a possible name collision in the Record Rules. For one
> > > show, I have an Automatic Record rule set up for my OTA tuner, and a
> > > Manual Record Rule set up for my Cable tuner.
> > >
> > > Big Sky
> > > Big Sky (Manual Record)
> > >
> > > If you eliminate "(Manual Record)", those separate record rules will be
> > > harder to
> > > distinguish. It would still be functional but it would be less clear to the
> > > user.
> > I don't think this should be a problem. Manual rules create
> > artificial programs with manualid = <rule-recordid>. Manual rules
> > only match programs with their own manualid and non-manual rules only
> > match programs where manualid = 0.
> >
> > David
>
> His point, I think, is that if we went with my first suggestion both
> recording rules would be labeled only as "Big Sky" without anything to
> differentiate them in mythfrontend -> Manage Recordings -> Recording Rules.
>
> This is not an issue for my use case, which is why I didn't think of that.?
> Trimming " (Manual Record)" after the fact is acceptable to me and supports
> this mixed use case of manual and automatic rules with otherwise the same
> title, by allowing the *user* to still easily identify which kind of rule it
> is without requiring further changes.

We already have this issue. In hindsight, we should have another
column in the record table called ruletitle that is completely user
editable. I would approve this change if you'd like to undertake it.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
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

What do you mean by "override recordings"?

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?

> 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.

Scott
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
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@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
On 10/3/22 17:34, David Engel wrote:
> 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.

Could that be why creating a new manual recording with the same
(default) name resulted in only one recording with the newer duration
overriding the old?

>
>> What do you mean by "override recordings"?
> Override rules -- don't record and record with override settings.

Don't record this showing works fine.

Record with override appeared to work, although setting two overrides
with three conflicting recordings and two tuners did not select both
overrides without reducing the recording priority of the third
recording.  However, we don't use that kind of override so I don't know
how it's supposed to work.

>
>> 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.
>

Changing the end late amount worked for a recording in progress.
Restarting a failed recording manually worked.

Scott
Re: Improving manual recordings [ In reply to ]
On 10/3/22 18:57, Scott Theisen wrote:
> Record with override appeared to work, although setting two overrides
> with three conflicting recordings and two tuners did not select both
> overrides without reducing the recording priority of the third
> recording.  However, we don't use that kind of override so I don't
> know how it's supposed to work.

I misunderstood what the override recording was for.  Steve Erlenborn
sent me a message off list about using it to time shift a recording, and
I have set up a test for that tomorrow which appeared to work.

Scott
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
On Mon, Oct 03, 2022 at 06:57:27PM -0400, Scott Theisen wrote:
> On 10/3/22 17:34, David Engel wrote:
> > 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.
>
> Could that be why creating a new manual recording with the same (default)
> name resulted in only one recording with the newer duration overriding the
> old?

Probably. The oldrecorded table serves multiple purposes. One
purpose is maitaining scheduler state and that keys off scheduled (not
recording) starttime, callsign and program title.

> > > What do you mean by "override recordings"?
> > Override rules -- don't record and record with override settings.
>
> Don't record this showing works fine.
>
> Record with override appeared to work, although setting two overrides with
> three conflicting recordings and two tuners did not select both overrides
> without reducing the recording priority of the third recording.? However, we
> don't use that kind of override so I don't know how it's supposed to work.
>
> >
> > > 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.
> >
>
> Changing the end late amount worked for a recording in progress. Restarting
> a failed recording manually worked.

I'm still not comfortable with the change. The more I think about it,
I like the ruletitle change much, much more. It's the old adage -- If
a thing is worth doing, it's worth doing well.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Improving manual recordings [ In reply to ]
On 10/3/22 21:33, David Engel wrote:
> On Mon, Oct 03, 2022 at 06:57:27PM -0400, Scott Theisen wrote:
>> On 10/3/22 17:34, David Engel wrote:
>>> 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.
>> Could that be why creating a new manual recording with the same (default)
>> name resulted in only one recording with the newer duration overriding the
>> old?
> Probably. The oldrecorded table serves multiple purposes. One
> purpose is maitaining scheduler state and that keys off scheduled (not
> recording) starttime, callsign and program title.

If it uses the callsign, that may be the cause of a separate issue I
discovered.  I receive two channels (22.1 and 67.1) with the same
callsign, MPT-HD.  When I manually scheduled a test recording on 22_1,
it recorded from the other channel, 67_1, instead.

>
>>>> What do you mean by "override recordings"?
>>> Override rules -- don't record and record with override settings.
>> Don't record this showing works fine.
>>
>> Record with override appeared to work, although setting two overrides with
>> three conflicting recordings and two tuners did not select both overrides
>> without reducing the recording priority of the third recording.  However, we
>> don't use that kind of override so I don't know how it's supposed to work.
>>
>>>> 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.
>>>
>> Changing the end late amount worked for a recording in progress. Restarting
>> a failed recording manually worked.
> I'm still not comfortable with the change. The more I think about it,
> I like the ruletitle change much, much more. It's the old adage -- If
> a thing is worth doing, it's worth doing well.
>
> David

I don't want perfect to become the enemy of good enough.  I think
trimming " (Manual Record)" is good enough.

If *you* also want to add ruletitle, that seems to me like a mostly
separate enhancement.  Since it is your idea, you probably have a better
idea of what that change entails.

Scott
Re: Improving manual recordings [ In reply to ]
On Tue, Oct 04, 2022 at 11:33:42AM -0400, Scott Theisen wrote:
> On 10/3/22 21:33, David Engel wrote:
> > On Mon, Oct 03, 2022 at 06:57:27PM -0400, Scott Theisen wrote:
> > > On 10/3/22 17:34, David Engel wrote:
> > > > 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.
> > > Could that be why creating a new manual recording with the same (default)
> > > name resulted in only one recording with the newer duration overriding the
> > > old?
> > Probably. The oldrecorded table serves multiple purposes. One
> > purpose is maitaining scheduler state and that keys off scheduled (not
> > recording) starttime, callsign and program title.
>
> If it uses the callsign, that may be the cause of a separate issue I
> discovered.? I receive two channels (22.1 and 67.1) with the same callsign,
> MPT-HD.? When I manually scheduled a test recording on 22_1, it recorded
> from the other channel, 67_1, instead.
>
> >
> > > > > What do you mean by "override recordings"?
> > > > Override rules -- don't record and record with override settings.
> > > Don't record this showing works fine.
> > >
> > > Record with override appeared to work, although setting two overrides with
> > > three conflicting recordings and two tuners did not select both overrides
> > > without reducing the recording priority of the third recording.? However, we
> > > don't use that kind of override so I don't know how it's supposed to work.
> > >
> > > > > 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.
> > > >
> > > Changing the end late amount worked for a recording in progress. Restarting
> > > a failed recording manually worked.
> > I'm still not comfortable with the change. The more I think about it,
> > I like the ruletitle change much, much more. It's the old adage -- If
> > a thing is worth doing, it's worth doing well.
> >
> > David
>
> I don't want perfect to become the enemy of good enough.

That's true sometimes. I don't think so in this case.

> I think trimming "
> (Manual Record)" is good enough.

Not when you've got a low risk alternative that not only solves this
but another, related issue too.

> If *you* also want to add ruletitle, that seems to me like a mostly separate
> enhancement.? Since it is your idea, you probably have a better idea of what
> that change entails.

Fine. I'll leave it on my TODO list. Until I get to it, *you* can
use the existing option to edit recording metadata after the fact.

David
--
David Engel
david@istwok.net
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org