Closed sy6sy2 closed 6 years ago
Yes. You can just call route.add_sort_methods(xbmcplugin.SORT_METHOD_UNSORTED)
.
You can also disable auto sorting by setting route.autosort = False
.
see: https://scriptmodulecodequick.readthedocs.io/en/stable/api/route.html#codequick.route.Route.autosort
from codequick import Route, Listitem
import xbmcplugin
@Route.register
def root(route):
route.autosort = False
route.add_sort_methods(xbmcplugin.SORT_METHOD_UNSORTED)
yield Listitem.from_dict("Extra videos", subfolder)
yield Listitem.from_dict("Play video", "http://www.example.com/video1.mkv")
P.S. If autosort is disabled and no sortmethods are given then SORT_METHOD_UNSORTED is set.
Thank you very munch.
And sorry, is my fault, I looked in the documentation but in the Listitem section -_-'
Hi Willforde,
Is it possible to manually add a sort method (let's say SORT_METHOD_UNSORTED) for a "videos" content listing?
The behavior that we want is to obtain the Kodi menu in the order in which each item was added during the for loop in the code.
Thank you for your help!
(cc @wwark)