Jump to content

JumpSMS ignore articles like 'The'


puithove

Recommended Posts

puithove

I use the JumpSMS option in my keymap so that I can punch the number buttons on my remote to jump through my movie list.  Since recently switching to MB from Plex, I've noticed this isn't working as expected.

 

My movies are sorted in the list correctly ignoring articles (meaning "The Abyss" shows in the list immediately after "About Time" and before "Ace Ventura Collection").  However, 'The' is still used by JumpSMS - so when I press the 8 key to jump to the Ts, it instead jumps to "The Abyss".

 

In the Kodi appearance settings, I have the "Ignore Articles" option enabled - though I've tried it both ways and it doesn't have any effect on the listings from MB, only the native Kodi library sections (I scanned in my movies folder for testing this).

 

I've verified that the JumpSMS still works properly with a native Kodi library section - so instead of jumping to "The Abyss", it jumps to "Teenage Mutant Ninja Turtles" like it should.

 

I think this all worked properly before with the PleXBMC addon, so I'm hoping this is something that can be tweaked in the MB addon.

 

Thoughts?  Is there any data I can gather to help?

  • Like 2
Link to comment
Share on other sites

xnappo

Can you please try a manual edit for me?

 

Open up 'plugin.video.xbmb3c/resources/lib/MainModule.py' and change line 1016 from:

        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_NONE)

to:

        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_TITLE)

Let me know if that changes it.  Note that we may not be able to support this fix as changing that has other implications.

 

xnappo

Edited by xnappo
Link to comment
Share on other sites

puithove

Yes, that definitely changes jumping - but as you say it has other implications.  The one and only stacked item (two versions of the same movie) I have in my library now for some reason shows up at the top of the list whereas it should be at the bottom.  That's just the first thing I see - haven't really dug in any further.

 

It's enough to know that you're on the right item though.

  • Like 1
Link to comment
Share on other sites

xnappo

Yep - basically we take over sorting from XBMC and use MB3 to give the sort info, however your SMS addon doesn't know that.

 

The only thing I can do here is make it an option, and you live with the results.  None of the sorting by year etc will work with this change.  I believe we have sorting features that PleXBMC does not have.

 

This test was just to confirm I knew why it was happening.

 

xnappo

Edited by xnappo
Link to comment
Share on other sites

puithove

Just to clarify - it's not an addon, it's built into xbmc/kodi, a re-mapping of the keys via the keyboard.xml:  http://kodi.wiki/view/HOW-TO:Use_T9-text_entry_for_remotes

 

I don't know that adding an option for changing the sort method is necessary or advisable - I'll leave that up to you.  But I'll ask that the SMS method be kept in mind to see if it's supportable in the future.

 

Another point of reference (and something that seems odd to me) is that Kodi's other method of jumping through the list - using Shift and a letter key - works properly here with Shift-T jumping right to the Ts and not to "The Abyss".

  • Like 1
Link to comment
Share on other sites

xnappo

Nevermind - tried it myself.  Doesn't seem there is a way around it that I know of - but I will keep an eye out for a solution.

 

xnappo

Link to comment
Share on other sites

xnappo

@ @@im85288 - I have been playing with this a bit.  Originally when we started WAY back in Frodo, the built-in sorting did not work right for anything other than title and date when set from Python.  

 

It seems this has been fixed, and now the built-in sorting is working much better.  This code:

    if "NextUp" in url and __settings__.getSetting('sortNextUp') == "true":
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_TITLE)
    else:
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_NONE)
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_TITLE_IGNORE_THE)
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_GENRE)
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_RATING)
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_YEAR)

Is now working much better than it did in Frodo - and it is faster too.  The only issue left is the weird thing where 'SORT_METHOD_TITLE' is putting the BoxSets first.  If it weren't for that, I would say maybe we should remove the server-side sorting and switch to built in.

 

Thoughts?

 

xnappo

Edited by xnappo
Link to comment
Share on other sites

xnappo

Okay - I think I got it.  

    if "NextUp" in url and __settings__.getSetting('sortNextUp') == "true":
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_TITLE)
    else:
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_SORT_TITLE_IGNORE_THE)
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_GENRE)
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_RATING)
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_YEAR)
    result = None
    

Thinking of putting this code in, and removing the context menu sorting.

Link to comment
Share on other sites

puithove

Okay - I think I got it.  

    if "NextUp" in url and __settings__.getSetting('sortNextUp') == "true":
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_TITLE)
    else:
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_SORT_TITLE_IGNORE_THE)
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_GENRE)
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_RATING)
        xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_YEAR)
    result = None
    

Thinking of putting this code in, and removing the context menu sorting.

 

Yes, that definitely solves the JumpSMS issue, and seems to work properly overall.  Of course since this is using Kodi's sort methods, it does bring in the rest of Kodi behavior - each section remembers its own sort method.  So if I change it for "All Movies", it doesn't change for other "Movies" sections... and of course each boxset collection has its own sort method setting.  Also, as you already pointed out, boxset collection entries don't have their own metadata so when using any sort method other than "Title" they are put at one end of the sort depending on order.

 

There may or may not be some things that could be done to tweak the behavior, but as Title is probably (I'm totally guessing here) the most used method, it might be workable.  I haven't played with the sort method before so don't know how this differs from what currently exists with the addon's sorting.

  • Like 1
Link to comment
Share on other sites

xnappo

I just added some code to the beta repo which switched to using the XBMC sorting.  The change was more involved than the above.  Let me know how it works for you.

 

xnappo

Link to comment
Share on other sites

puithove

Either you're still in the middle of the upload, or there's some lingering issues with the Beta repository.  The addon isn't listed there at the moment - still showing the two skins and the helpers/programs.  Not the MB addon itself though - have already done a force refresh.

  • Like 1
Link to comment
Share on other sites

puithove

Ok, I got 9.752 installed.  Sorting looks good, and the JumpSMS looks good.

 

Let me just say thanks for taking a look at this.  You guys are awesome.

  • Like 1
Link to comment
Share on other sites

xnappo

No problem!  Please let us know if you see any issues.  That Frodo sorting bug from a year ago always bugged me, so I am glad there was a reason to take a look and find it was fixed way back in Gotham.

 

Besides - I am trying to distract myself from not being able to play my new Dragon Age due to freakin PSN :D

Edited by xnappo
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...