Mailing List Archive

Bug related to ignoring the and a in title ordering
Hoi All,

I encountered an annoying bug. I am still on 0.27 so don't know if it
still exists, but I guess it does.
In my recordings I have a movie "Dark Heart".
Currently there is a running series called "The Dark Heart" or
actually "M?rkt Hj?rta" but it is running under the English translated
name.
If I select "List Recorded Episodes" nothing happens.
On going there the long way I saw I have in my recordings a movie
called "Dark Heart".
So my guess is the names with and without "The" are not consistently
used in coding. I do not see any error in the log.

--
Tot Mails,
Hika mailto:hikavdh@gmail.com
Mijn Mailadres is gewijzigd. Zie hierboven!

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
On Sun, 19 Mar 2023 00:47:31 +0100, you wrote:

>Hoi All,
>
>I encountered an annoying bug. I am still on 0.27 so don't know if it
>still exists, but I guess it does.
>In my recordings I have a movie "Dark Heart".
>Currently there is a running series called "The Dark Heart" or
>actually "M?rkt Hj?rta" but it is running under the English translated
>name.
>If I select "List Recorded Episodes" nothing happens.
>On going there the long way I saw I have in my recordings a movie
>called "Dark Heart".
>So my guess is the names with and without "The" are not consistently
>used in coding. I do not see any error in the log.

I met this problem a year or two ago, and I discovered that there is
an option to turn off the ignoring of "The". But I can not remember
exactly where it is.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
Hoi Stephen,

Sunday, March 19, 2023, 3:43:51 AM, you wrote:

> On Sun, 19 Mar 2023 00:47:31 +0100, you wrote:

>>Hoi All,
>>
>>I encountered an annoying bug. I am still on 0.27 so don't know if it
>>still exists, but I guess it does.
>>In my recordings I have a movie "Dark Heart".
>>Currently there is a running series called "The Dark Heart" or
>>actually "M?rkt Hj?rta" but it is running under the English translated
>>name.
>>If I select "List Recorded Episodes" nothing happens.
>>On going there the long way I saw I have in my recordings a movie
>>called "Dark Heart".
>>So my guess is the names with and without "The" are not consistently
>>used in coding. I do not see any error in the log.

> I met this problem a year or two ago, and I discovered that there is
> an option to turn off the ignoring of "The". But I can not remember
> exactly where it is.

Does anybody know!


Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
On Sun, 2023-03-19 at 05:11 +0100, Hika van den Hoven wrote:
> Hoi Stephen,
>
> Sunday, March 19, 2023, 3:43:51 AM, you wrote:
>
> > On Sun, 19 Mar 2023 00:47:31 +0100, you wrote:
>
> > > Hoi All,
> > >
> > > I encountered an annoying bug. I am still on 0.27 so don't know
> > > if it
> > > still exists, but I guess it does.
> > > In my recordings I have a movie "Dark Heart".
> > > Currently there is a running series called "The Dark Heart" or
> > > actually "Mörkt Hjärta" but it is running under the English
> > > translated
> > > name.
> > > If I select "List Recorded Episodes" nothing happens.
> > > On going there the long way I saw I have in my recordings a movie
> > > called "Dark Heart".
> > > So my guess is the names with and without "The" are not
> > > consistently
> > > used in coding. I do not see any error in the log.
>
> > I met this problem a year or two ago, and I discovered that there
> > is
> > an option to turn off the ignoring of "The".  But I can not
> > remember
> > exactly where it is.
>
> Does anybody know!

Setup -> General -> General -> Remove Prefixes when Sorting (*)

MythTV never actually removes the prefix from the title, it just
ignores the prefix when sorting names. It sounds like something else
is going on that is causing "Dark Heart" and "The Dark Heart" to be
confused.

David

* That label needs to be updated to "Ignore Prefixes when Sorting". The
description also needs to be updated.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
> On 19 Mar 2023, at 7:47 am, Hika van den Hoven <hikavdh@gmail.com> wrote:
>
> Hoi All,
>
> I encountered an annoying bug. I am still on 0.27 so don't know if it
> still exists, but I guess it does.
> In my recordings I have a movie "Dark Heart".
> Currently there is a running series called "The Dark Heart" or
> actually "Mörkt Hjärta" but it is running under the English translated
> name.
> If I select "List Recorded Episodes" nothing happens.
> On going there the long way I saw I have in my recordings a movie
> called "Dark Heart".
> So my guess is the names with and without "The" are not consistently
> used in coding. I do not see any error in the log.

The whole scan / metadata has been an utter heartache for me so I may proclaim a few things
The checksum counts
The name does not
The chechsum calculation is IMHO stupid
It easy to get multiple files with same checksum then they will not scan
I cut a file and save it as "name"
I then chop a few secs of rubbish at start, save it as "name"
I now have 2 videos called "name" almost identical

I have a CLI utility called hashDups. Mail me for the src. It.is a simple Qt console app. (qmake, make)

The mess is tameable, it does work

James

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
Hoi David,

Sunday, March 19, 2023, 5:41:05 AM, you wrote:

> On Sun, 2023-03-19 at 05:11 +0100, Hika van den Hoven wrote:
>> Hoi Stephen,
>>
>> Sunday, March 19, 2023, 3:43:51 AM, you wrote:
>>
>> > On Sun, 19 Mar 2023 00:47:31 +0100, you wrote:
>>
>> > > Hoi All,
>> > >
>> > > I encountered an annoying bug. I am still on 0.27 so don't know
>> > > if it
>> > > still exists, but I guess it does.
>> > > In my recordings I have a movie "Dark Heart".
>> > > Currently there is a running series called "The Dark Heart" or
>> > > actually "Mörkt Hjärta" but it is running under the English
>> > > translated
>> > > name.
>> > > If I select "List Recorded Episodes" nothing happens.
>> > > On going there the long way I saw I have in my recordings a movie
>> > > called "Dark Heart".
>> > > So my guess is the names with and without "The" are not
>> > > consistently
>> > > used in coding. I do not see any error in the log.
>>
>> > I met this problem a year or two ago, and I discovered that there
>> > is
>> > an option to turn off the ignoring of "The".  But I can not
>> > remember
>> > exactly where it is.
>>
>> Does anybody know!

Setup ->> General -> General -> Remove Prefixes when Sorting (*)

> MythTV never actually removes the prefix from the title, it just
> ignores the prefix when sorting names. It sounds like something else
> is going on that is causing "Dark Heart" and "The Dark Heart" to be
> confused.

> David

> * That label needs to be updated to "Ignore Prefixes when Sorting". The
> description also needs to be updated.

Thanks.
Either that option was added after 0.27 or it is not present in
MythCenter-wide. On the indicated page I only have "Use line edit
virtual keyboard" and "Screen shot path"


Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
Hoi Hika,

Sunday, March 19, 2023, 12:48:56 PM, you wrote:

> Hoi David,

> Sunday, March 19, 2023, 5:41:05 AM, you wrote:

>> On Sun, 2023-03-19 at 05:11 +0100, Hika van den Hoven wrote:
>>> Hoi Stephen,
>>>
>>> Sunday, March 19, 2023, 3:43:51 AM, you wrote:
>>>
>>> > On Sun, 19 Mar 2023 00:47:31 +0100, you wrote:
>>>
>>> > > Hoi All,
>>> > >
>>> > > I encountered an annoying bug. I am still on 0.27 so don't know
>>> > > if it
>>> > > still exists, but I guess it does.
>>> > > In my recordings I have a movie "Dark Heart".
>>> > > Currently there is a running series called "The Dark Heart" or
>>> > > actually "Mörkt Hjärta" but it is running under the English
>>> > > translated
>>> > > name.
>>> > > If I select "List Recorded Episodes" nothing happens.
>>> > > On going there the long way I saw I have in my recordings a movie
>>> > > called "Dark Heart".
>>> > > So my guess is the names with and without "The" are not
>>> > > consistently
>>> > > used in coding. I do not see any error in the log.
>>>
>>> > I met this problem a year or two ago, and I discovered that there
>>> > is
>>> > an option to turn off the ignoring of "The".  But I can not
>>> > remember
>>> > exactly where it is.
>>>
>>> Does anybody know!

Setup ->>> General -> General -> Remove Prefixes when Sorting (*)

>> MythTV never actually removes the prefix from the title, it just
>> ignores the prefix when sorting names. It sounds like something else
>> is going on that is causing "Dark Heart" and "The Dark Heart" to be
>> confused.

>> David

>> * That label needs to be updated to "Ignore Prefixes when Sorting". The
>> description also needs to be updated.

> Thanks.
> Either that option was added after 0.27 or it is not present in
> MythCenter-wide. On the indicated page I only have "Use line edit
> virtual keyboard" and "Screen shot path"


I rechecked everywhere, I even checked the settings table for any
setting name starting with remove or ignore.
I guess it was added after 0.27.

I thing I will rename the series to its original Scandinavian name.


Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
On 19/03/2023 14:33, Hika van den Hoven wrote:
> I rechecked everywhere, I even checked the settings table for any
> setting name starting with remove or ignore.
> I guess it was added after 0.27.
>
> I thing I will rename the series to its original Scandinavian name.
>

Well 0.27 is coming up to be 10 years old in September so it's not
really surprising some things have changed :)


Paul H.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
On Sun, 19 Mar 2023 15:33:12 +0100, you wrote:

>Hoi Hika,
>
>Sunday, March 19, 2023, 12:48:56 PM, you wrote:

>>>> Does anybody know!
>
>Setup ->>> General -> General -> Remove Prefixes when Sorting (*)
>
>>> MythTV never actually removes the prefix from the title, it just
>>> ignores the prefix when sorting names. It sounds like something else
>>> is going on that is causing "Dark Heart" and "The Dark Heart" to be
>>> confused.
>
>>> David
>
>>> * That label needs to be updated to "Ignore Prefixes when Sorting". The
>>> description also needs to be updated.
>
>> Thanks.
>> Either that option was added after 0.27 or it is not present in
>> MythCenter-wide. On the indicated page I only have "Use line edit
>> virtual keyboard" and "Screen shot path"
>
>
>I rechecked everywhere, I even checked the settings table for any
>setting name starting with remove or ignore.
>I guess it was added after 0.27.
>
>I thing I will rename the series to its original Scandinavian name.

I think the setting is SortStripPrefixes:

MariaDB [mythconverg]> select * from settings where value like
'%prefixes%';
+-------------------+------+----------+
| value | data | hostname |
+-------------------+------+----------+
| SortStripPrefixes | 0 | NULL |
+-------------------+------+----------+
1 row in set (0.002 sec)
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
On Sunday 19 March 2023 11:38:44 AM (-05:00), Stephen Worthington wrote:

> On Sun, 19 Mar 2023 15:33:12 +0100, you wrote:
>
> >Hoi Hika,
> >
> >Sunday, March 19, 2023, 12:48:56 PM, you wrote:
>
> >>>> Does anybody know!
> >
> >Setup ->>> General -> General -> Remove Prefixes when Sorting (*)
> >
> >>> MythTV never actually removes the prefix from the title, it just
> >>> ignores the prefix when sorting names. It sounds like something
else
> >>> is going on that is causing "Dark Heart" and "The Dark Heart" to be
> >>> confused.
> >
> >>> David
> >
> >>> * That label needs to be updated to "Ignore Prefixes when Sorting".
The
> >>> description also needs to be updated.
> >
> >> Thanks.
> >> Either that option was added after 0.27 or it is not present in
> >> MythCenter-wide. On the indicated page I only have "Use line edit
> >> virtual keyboard" and "Screen shot path"
> >
> >
> >I rechecked everywhere, I even checked the settings table for any
> >setting name starting with remove or ignore.
> >I guess it was added after 0.27.
> >
> >I thing I will rename the series to its original Scandinavian name.
>
> I think the setting is SortStripPrefixes:
>
> MariaDB [mythconverg]> select * from settings where value like
> '%prefixes%';
> +-------------------+------+----------+
> | value | data | hostname |
> +-------------------+------+----------+
> | SortStripPrefixes | 0 | NULL |
> +-------------------+------+----------+

Or in frontend settings: "Remove prefixes when sorting" (from a commit on
3/5/2017.)
There's also the semicolon separated list: "Names exempt from prefix
removal".
--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
Hoi Paul,

Sunday, March 19, 2023, 4:50:09 PM, you wrote:

> On 19/03/2023 14:33, Hika van den Hoven wrote:
>> I rechecked everywhere, I even checked the settings table for any
>> setting name starting with remove or ignore.
>> I guess it was added after 0.27.
>>
>> I thing I will rename the series to its original Scandinavian name.
>>

> Well 0.27 is coming up to be 10 years old in September so it's not
> really surprising some things have changed :)


> Paul H.

I know, but it is still mostly doing what it is supposed to. And
upgrading means a lot of work and in Gentoo MythTV is no longer
standard available, so I have to find an emerge script somewhere or
make one based on an old one. And at least 4 complete reinstalls.
It has to wait till it reaches the top of the priority list.


Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
On Sun, 2023-03-19 at 12:48 +0100, Hika van den Hoven wrote:
> Hoi David,
>
> Sunday, March 19, 2023, 5:41:05 AM, you wrote:
>
> > On Sun, 2023-03-19 at 05:11 +0100, Hika van den Hoven wrote:
> > > Hoi Stephen,
> > >
> > > Sunday, March 19, 2023, 3:43:51 AM, you wrote:
> > >
> > > > On Sun, 19 Mar 2023 00:47:31 +0100, you wrote:
> > >
> > > > > Hoi All,
> > > > >
> > > > > I encountered an annoying bug. I am still on 0.27 so don't
> > > > > know
> > > > > if it
> > > > > still exists, but I guess it does.
> > > > > In my recordings I have a movie "Dark Heart".
> > > > > Currently there is a running series called "The Dark Heart"
> > > > > or
> > > > > actually "Mörkt Hjärta" but it is running under the English
> > > > > translated
> > > > > name.
> > > > > If I select "List Recorded Episodes" nothing happens.
> > > > > On going there the long way I saw I have in my recordings a
> > > > > movie
> > > > > called "Dark Heart".
> > > > > So my guess is the names with and without "The" are not
> > > > > consistently
> > > > > used in coding. I do not see any error in the log.
> > >
> > > > I met this problem a year or two ago, and I discovered that
> > > > there
> > > > is
> > > > an option to turn off the ignoring of "The".  But I can not
> > > > remember
> > > > exactly where it is.
> > >
> > > Does anybody know!
>
> Setup ->> General -> General -> Remove Prefixes when Sorting (*)
>
> > MythTV never actually removes the prefix from the title, it just
> > ignores the prefix when sorting names.  It sounds like something
> > else
> > is going on that is causing "Dark Heart" and "The Dark Heart" to be
> > confused.
>
> > David
>
> > * That label needs to be updated to "Ignore Prefixes when Sorting".
> > The
> > description also needs to be updated.
>
> Thanks.
> Either that option was added after 0.27 or it is not present in
> MythCenter-wide. On the indicated page I only have "Use line edit
> virtual keyboard" and "Screen shot path"

You're right. I just checked this morning and my rework of the sorting
code went into 0.30.

I've been looking at the patch from 2017 that changed sorting, I don't
see any removed option related to sorting, only the added one I
mentioned before. I don't think you could disable the prefix ignoring
code before 0.30.

I also started digging into the code and I've found the problem.  Its a
little complicated though. When creating the Watched Recordings page:

1) Each entry in the group list has a sorting name and a display name.
For your listings this might be a sort name of "Dark Horse" and a
display name of "The Dark Horse".

2) The group list enforces unique sort names.

3) Recordings are added to a group based upon their sort name.

4) The "List Recorded Episodes" action looks up the title of the
currently selected program in the group list based on its display name,
and switches to that group.

Putting these things together, here's what happens. When the watch
recordings page is created, because "Dark Horse" and "The Dark Horse"
have the same sortable title only one entry gets created in the group
list. Whether the display name for that group is "Dark Horse" or "The
Dark Horse" depends upon the order that the programs were returned from
the database. Lets assume that the display name is set to "The Dark
Horse". When you go into "All Programs" group and choose a program
named "The Dark Horse" and select "List Recorded Episodes", the name is
successfully looked up in the group list and MythTV will switch to that
group. If, however, you choose a program named "Dark Horse" and
selected "List Recorded Episodes", that name cannot be found in the
group list (because the display name there is the "The Dark Horse") so
the display doesn't switch.

I can recreate this problem in the latest code. Disabling the "Remove
Prefixes when Sorting" option solves the problem in the latest code. In
this function in 0.27 however, stripping the article prefixes when
creating the sort names is hard coded and can't be disabled.

I'm filing an issue report now to fix this in the latest code.

David

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
Hoi David,

Sunday, March 19, 2023, 9:00:09 PM, you wrote:

> On Sun, 2023-03-19 at 12:48 +0100, Hika van den Hoven wrote:
>> Hoi David,
>>
>> Sunday, March 19, 2023, 5:41:05 AM, you wrote:
>>
>> > On Sun, 2023-03-19 at 05:11 +0100, Hika van den Hoven wrote:
>> > > Hoi Stephen,
>> > >
>> > > Sunday, March 19, 2023, 3:43:51 AM, you wrote:
>> > >
>> > > > On Sun, 19 Mar 2023 00:47:31 +0100, you wrote:
>> > >
>> > > > > Hoi All,
>> > > > >
>> > > > > I encountered an annoying bug. I am still on 0.27 so don't
>> > > > > know
>> > > > > if it
>> > > > > still exists, but I guess it does.
>> > > > > In my recordings I have a movie "Dark Heart".
>> > > > > Currently there is a running series called "The Dark Heart"
>> > > > > or
>> > > > > actually "Mörkt Hjärta" but it is running under the English
>> > > > > translated
>> > > > > name.
>> > > > > If I select "List Recorded Episodes" nothing happens.
>> > > > > On going there the long way I saw I have in my recordings a
>> > > > > movie
>> > > > > called "Dark Heart".
>> > > > > So my guess is the names with and without "The" are not
>> > > > > consistently
>> > > > > used in coding. I do not see any error in the log.
>> > >
>> > > > I met this problem a year or two ago, and I discovered that
>> > > > there
>> > > > is
>> > > > an option to turn off the ignoring of "The".  But I can not
>> > > > remember
>> > > > exactly where it is.
>> > >
>> > > Does anybody know!
>>
>> Setup ->> General -> General -> Remove Prefixes when Sorting (*)
>>
>> > MythTV never actually removes the prefix from the title, it just
>> > ignores the prefix when sorting names.  It sounds like something
>> > else
>> > is going on that is causing "Dark Heart" and "The Dark Heart" to be
>> > confused.
>>
>> > David
>>
>> > * That label needs to be updated to "Ignore Prefixes when Sorting".
>> > The
>> > description also needs to be updated.
>>
>> Thanks.
>> Either that option was added after 0.27 or it is not present in
>> MythCenter-wide. On the indicated page I only have "Use line edit
>> virtual keyboard" and "Screen shot path"

> You're right. I just checked this morning and my rework of the sorting
> code went into 0.30.

> I've been looking at the patch from 2017 that changed sorting, I don't
> see any removed option related to sorting, only the added one I
> mentioned before. I don't think you could disable the prefix ignoring
> code before 0.30.

> I also started digging into the code and I've found the problem.  Its a
> little complicated though. When creating the Watched Recordings page:

> 1) Each entry in the group list has a sorting name and a display name.
> For your listings this might be a sort name of "Dark Horse" and a
> display name of "The Dark Horse".

> 2) The group list enforces unique sort names.

> 3) Recordings are added to a group based upon their sort name.

> 4) The "List Recorded Episodes" action looks up the title of the
> currently selected program in the group list based on its display name,
> and switches to that group.

> Putting these things together, here's what happens. When the watch
> recordings page is created, because "Dark Horse" and "The Dark Horse"
> have the same sortable title only one entry gets created in the group
> list. Whether the display name for that group is "Dark Horse" or "The
> Dark Horse" depends upon the order that the programs were returned from
> the database. Lets assume that the display name is set to "The Dark
> Horse". When you go into "All Programs" group and choose a program
> named "The Dark Horse" and select "List Recorded Episodes", the name is
> successfully looked up in the group list and MythTV will switch to that
> group. If, however, you choose a program named "Dark Horse" and
> selected "List Recorded Episodes", that name cannot be found in the
> group list (because the display name there is the "The Dark Horse") so
> the display doesn't switch.

> I can recreate this problem in the latest code. Disabling the "Remove
> Prefixes when Sorting" option solves the problem in the latest code. In
> this function in 0.27 however, stripping the article prefixes when
> creating the sort names is hard coded and can't be disabled.

> I'm filing an issue report now to fix this in the latest code.

> David

Great you found it! Thanks, although it presently does not help me.
What you found is what I guessed. A mix up of the two title versions.
A common cause for unexpected behavior.
As said I will rename the series to the original Scandinavian title.

Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
Hoi Hika,

Monday, March 20, 2023, 1:17:45 AM, you wrote:

> Hoi David,

> Sunday, March 19, 2023, 9:00:09 PM, you wrote:

>> On Sun, 2023-03-19 at 12:48 +0100, Hika van den Hoven wrote:
>>> Hoi David,
>>>
>>> Sunday, March 19, 2023, 5:41:05 AM, you wrote:
>>>
>>> > On Sun, 2023-03-19 at 05:11 +0100, Hika van den Hoven wrote:
>>> > > Hoi Stephen,
>>> > >
>>> > > Sunday, March 19, 2023, 3:43:51 AM, you wrote:
>>> > >
>>> > > > On Sun, 19 Mar 2023 00:47:31 +0100, you wrote:
>>> > >
>>> > > > > Hoi All,
>>> > > > >
>>> > > > > I encountered an annoying bug. I am still on 0.27 so don't
>>> > > > > know
>>> > > > > if it
>>> > > > > still exists, but I guess it does.
>>> > > > > In my recordings I have a movie "Dark Heart".
>>> > > > > Currently there is a running series called "The Dark Heart"
>>> > > > > or
>>> > > > > actually "Mörkt Hjärta" but it is running under the English
>>> > > > > translated
>>> > > > > name.
>>> > > > > If I select "List Recorded Episodes" nothing happens.
>>> > > > > On going there the long way I saw I have in my recordings a
>>> > > > > movie
>>> > > > > called "Dark Heart".
>>> > > > > So my guess is the names with and without "The" are not
>>> > > > > consistently
>>> > > > > used in coding. I do not see any error in the log.
>>> > >
>>> > > > I met this problem a year or two ago, and I discovered that
>>> > > > there
>>> > > > is
>>> > > > an option to turn off the ignoring of "The".  But I can not
>>> > > > remember
>>> > > > exactly where it is.
>>> > >
>>> > > Does anybody know!
>>>
>>> Setup ->> General -> General -> Remove Prefixes when Sorting (*)
>>>
>>> > MythTV never actually removes the prefix from the title, it just
>>> > ignores the prefix when sorting names.  It sounds like something
>>> > else
>>> > is going on that is causing "Dark Heart" and "The Dark Heart" to be
>>> > confused.
>>>
>>> > David
>>>
>>> > * That label needs to be updated to "Ignore Prefixes when Sorting".
>>> > The
>>> > description also needs to be updated.
>>>
>>> Thanks.
>>> Either that option was added after 0.27 or it is not present in
>>> MythCenter-wide. On the indicated page I only have "Use line edit
>>> virtual keyboard" and "Screen shot path"

>> You're right. I just checked this morning and my rework of the sorting
>> code went into 0.30.

>> I've been looking at the patch from 2017 that changed sorting, I don't
>> see any removed option related to sorting, only the added one I
>> mentioned before. I don't think you could disable the prefix ignoring
>> code before 0.30.

>> I also started digging into the code and I've found the problem.  Its a
>> little complicated though. When creating the Watched Recordings page:

>> 1) Each entry in the group list has a sorting name and a display name.
>> For your listings this might be a sort name of "Dark Horse" and a
>> display name of "The Dark Horse".

>> 2) The group list enforces unique sort names.

>> 3) Recordings are added to a group based upon their sort name.

>> 4) The "List Recorded Episodes" action looks up the title of the
>> currently selected program in the group list based on its display name,
>> and switches to that group.

>> Putting these things together, here's what happens. When the watch
>> recordings page is created, because "Dark Horse" and "The Dark Horse"
>> have the same sortable title only one entry gets created in the group
>> list. Whether the display name for that group is "Dark Horse" or "The
>> Dark Horse" depends upon the order that the programs were returned from
>> the database. Lets assume that the display name is set to "The Dark
>> Horse". When you go into "All Programs" group and choose a program
>> named "The Dark Horse" and select "List Recorded Episodes", the name is
>> successfully looked up in the group list and MythTV will switch to that
>> group. If, however, you choose a program named "Dark Horse" and
>> selected "List Recorded Episodes", that name cannot be found in the
>> group list (because the display name there is the "The Dark Horse") so
>> the display doesn't switch.

>> I can recreate this problem in the latest code. Disabling the "Remove
>> Prefixes when Sorting" option solves the problem in the latest code. In
>> this function in 0.27 however, stripping the article prefixes when
>> creating the sort names is hard coded and can't be disabled.

>> I'm filing an issue report now to fix this in the latest code.

>> David

> Great you found it! Thanks, although it presently does not help me.
> What you found is what I guessed. A mix up of the two title versions.
> A common cause for unexpected behavior.
> As said I will rename the series to the original Scandinavian title.

> Tot mails,
> Hika mailto:hikavdh@gmail.com

The solution as I see it, but I don't do C only Python, is to always
use the display title as identity tag. In Python you can sort on the
base of an associated value that does not need to be unique. It's
called a lambda


Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Bug related to ignoring the and a in title ordering [ In reply to ]
Hoi Hika,

Monday, March 20, 2023, 1:48:04 AM, you wrote:

> Hoi Hika,

> Monday, March 20, 2023, 1:17:45 AM, you wrote:

>> Hoi David,

>> Sunday, March 19, 2023, 9:00:09 PM, you wrote:

<snip>

>>>> > David
>>>>
>>>> > * That label needs to be updated to "Ignore Prefixes when Sorting".
>>>> > The
>>>> > description also needs to be updated.
>>>>
>>>> Thanks.
>>>> Either that option was added after 0.27 or it is not present in
>>>> MythCenter-wide. On the indicated page I only have "Use line edit
>>>> virtual keyboard" and "Screen shot path"

>>> You're right. I just checked this morning and my rework of the sorting
>>> code went into 0.30.

>>> I've been looking at the patch from 2017 that changed sorting, I don't
>>> see any removed option related to sorting, only the added one I
>>> mentioned before. I don't think you could disable the prefix ignoring
>>> code before 0.30.

>>> I also started digging into the code and I've found the problem.  Its a
>>> little complicated though. When creating the Watched Recordings page:

>>> 1) Each entry in the group list has a sorting name and a display name.
>>> For your listings this might be a sort name of "Dark Horse" and a
>>> display name of "The Dark Horse".

>>> 2) The group list enforces unique sort names.

>>> 3) Recordings are added to a group based upon their sort name.

>>> 4) The "List Recorded Episodes" action looks up the title of the
>>> currently selected program in the group list based on its display name,
>>> and switches to that group.

>>> Putting these things together, here's what happens. When the watch
>>> recordings page is created, because "Dark Horse" and "The Dark Horse"
>>> have the same sortable title only one entry gets created in the group
>>> list. Whether the display name for that group is "Dark Horse" or "The
>>> Dark Horse" depends upon the order that the programs were returned from
>>> the database. Lets assume that the display name is set to "The Dark
>>> Horse". When you go into "All Programs" group and choose a program
>>> named "The Dark Horse" and select "List Recorded Episodes", the name is
>>> successfully looked up in the group list and MythTV will switch to that
>>> group. If, however, you choose a program named "Dark Horse" and
>>> selected "List Recorded Episodes", that name cannot be found in the
>>> group list (because the display name there is the "The Dark Horse") so
>>> the display doesn't switch.

>>> I can recreate this problem in the latest code. Disabling the "Remove
>>> Prefixes when Sorting" option solves the problem in the latest code. In
>>> this function in 0.27 however, stripping the article prefixes when
>>> creating the sort names is hard coded and can't be disabled.

>>> I'm filing an issue report now to fix this in the latest code.

>>> David

>> Great you found it! Thanks, although it presently does not help me.
>> What you found is what I guessed. A mix up of the two title versions.
>> A common cause for unexpected behavior.
>> As said I will rename the series to the original Scandinavian title.

>> Tot mails,
>> Hika mailto:hikavdh@gmail.com

> The solution as I see it, but I don't do C only Python, is to always
> use the display title as identity tag. In Python you can sort on the
> base of an associated value that does not need to be unique. It's
> called a lambda

On further thinking you even better use the seriesid/movieid as
identity tag with, for instance "S" and "M", added. This way you
distinguish between those too.


Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org