It's possible to set a "custom" SORT_METHOD?
#1
I have these ListItem:

Code:
listitem.setInfo('video', {
            'title'   : issue_name,         'premiered': issue['m_date'],
            'genre'   : issue['m_genre'],   'studio'   : issue['m_publisher'],
            'rating'  : issue['m_rating'],  'plot'     : issue['m_plot'],
            'path'    : issue['filename'],  'year'     : issue['m_year'],
            'overlay' : ICON_OVERLAY,     
            })
        listitem.setProperty('issue', issue['id'])
        listitem.setProperty('issue_number', issue['m_number'])
        listitem.setProperty('issue_title', issue['m_title'])
        listitem.setProperty('name', issue['m_name'])        
        listitem.setProperty('magazine_name', issue['m_magazine'])        
        listitem.setProperty('issue_style', issue['m_style'])

and i have these Sort Methods

Code:
        xbmcplugin.addSortMethod(handle = self.addon_handle, sortMethod = xbmcplugin.SORT_METHOD_UNSORTED)
        xbmcplugin.addSortMethod(handle = self.addon_handle, sortMethod = xbmcplugin.SORT_METHOD_LABEL_IGNORE_FOLDERS)
        xbmcplugin.addSortMethod(handle = self.addon_handle, sortMethod = xbmcplugin.SORT_METHOD_VIDEO_YEAR)
        xbmcplugin.addSortMethod(handle = self.addon_handle, sortMethod = xbmcplugin.SORT_METHOD_STUDIO)
        xbmcplugin.addSortMethod(handle = self.addon_handle, sortMethod = xbmcplugin.SORT_METHOD_GENRE)

I want to add a new sort for 'issue_number'

It's possible to create a custom one?
Reply
#2
(2022-12-15, 20:36)sagrath Wrote: I want to add a new sort for 'issue_number'

It's possible to create a custom one?

Is there a reason you can't use episode instead of issue_number and then you can use the standard xbmcplugin.SORT_METHOD_EPISODE sorting method ?  I don't believe you can define custom sort orders within an addon.  I personally use Mezzmo and similar techniques for that.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#3
(2022-12-15, 20:48)jbinkley60 Wrote: Is there a reason you can't use episode instead of issue_number and then you can use the standard xbmcplugin.SORT_METHOD_EPISODE sorting method ?  I don't believe you can define custom sort orders within an addon.  I personally use Mezzmo and similar techniques for that.


No reason, I didn't think of using a method aimed at TVShows specifically. I'll try using SORT_METHOD_EPISODE. I believe it will work
Thanks in advance!
Reply

Logout Mark Read Team Forum Stats Members Help
It's possible to set a "custom" SORT_METHOD?0