[mythtv-users] Bug related to ignoring the and a in title ordering
Hika van den Hoven
hikavdh at gmail.com
Mon Mar 20 01:01:02 UTC 2023
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 at 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 at 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
More information about the mythtv-users
mailing list