Ability to sort by original title

Most of (newer) scrapers (such as default tmdb) supports wraping item Title in user’s choice language. And they are able to store also original name into originaltitle variable (infolabel).

It could be displayed by skin in lists, etc. User can choose, which title he wants in lists, dynamically, even both of them for example.

The problem is, that Kodi lacks function to sort list according that title. It supports only Title, and Sorttitle parameters. Sorttitle is written to DB during scraping, so its not dynamic parameter at all.

I added this SortbyOriginalTitle function to Kodi (using 18 at this time, due to GXBB platform). I know, that this should go to the Kodi, and I will try create PR there eventually, but looking on Issues they have quite a full hands with Matrix, I would guess this will take significant amount of time to pull out.

My question is: would you be willing include this to the CE’s xbmc, if I create PR against CE’s xbmc? Or could be added like temporary patch, but this would be more suitable for 18 branch, since 19 is very active and patch would be possible needed to correct in future.

Example on dummy data: https://streamable.com/kgvjj9

Best would be you make a PR to xbmc/master. We can then temporary pick the PR until it get (maybe) merged.

1 Like

Thanks. Fingers crossed.

xbmc 18 https://github.com/xbmc/xbmc/pull/19434
xbmc 19 https://github.com/xbmc/xbmc/pull/19435

2 Likes

So far it works fine for me on Win32/Amlogic/Amlogic-ng… The 18 branch PR was closed, it will be maybe backported or not (they dont backport features usually). 19 branch is now in pending room :slight_smile:

I added also sortmetod into JSON call, after 19434 was closed, so there is missing one commit, if you would decide to pick that one for Leia at some point. PR against master should be complete I believe.

If anyone would like to have this, or wants to take a quick peek, here is patch for Leia branch.

Seems it will not be in upstream until Kodi 20.

@Portisch Feel free to cherrypick those into Leia/Matrix branches :slight_smile:

We have it already a long time in Matrix.

Do I need to update the patch @JimmyS ?

Edit: I just saw you still have formatting issues in the PR. Please correct them that I can update the patch in CoreELEC, thank you.

Ah, I didnt didnt noticed that (I am on 9.2 due to C2 hardware), I didnt noticed it on 9.2 branch so I assumed it wasnt included at all :slight_smile:

The formatting should be already solved, I think that second automated Jenkins response was caused due build, which was automatically planned before I appled/commited requested changes and finishes after submit.

Thank you, I updated the patch in CE.

Please remind the api version did change and your patch does not apply anymore:

It’s already 12.3.0 now. So I changed it to patch from 12.3.0 to 12.3.1.

@JimmyS what about the JSON API version?
Every time I rebase XBMC and the JSONRPC_VERSION is changed the patch fails.
Is it really needed to bump the JSONRPC_VERSION or can it be excluded from the patch?

well, to be honest I dont have that deep understanding of project, but if I remember corectly, Kodi team requested JSON coverage in original PR, as I didnt include it in first draft.

For the patch purposes, I dont think that version number is needed to track, and when they include this PR, the patch wouldnt be needed at all (at least for the next Kodi version) ? However, the working code for JSON call could be usefull for someone.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.