Kodi Community Forum
Container.SetSortDirection? - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Container.SetSortDirection? (/showthread.php?tid=147029)



Container.SetSortDirection? - jingai - 2012-12-03

Is it possible for a plugin to set the sort direction of the current container? Container.SortDirection can toggle it, but it can't set it explicitly.


RE: Container.SetSortDirection? - jingai - 2012-12-10

...just not possible I'm assuming?


RE: Container.SetSortDirection? - LehighBri - 2012-12-10

I'm definitely interested in this and would love to know how to do this (if it exists today) or how to submit an enhancement request (if it doesn't exist in Frodo).


RE: Container.SetSortDirection? - jingai - 2012-12-19

Well... maybe I can make a request for this to be added then? Add to Trac?


RE: Container.SetSortDirection? - jmarshall - 2012-12-19

Not possible atm, no. Not sure how easy it'd be to add (it'd be dependent on sort mode I guess?)


RE: Container.SetSortDirection? - jingai - 2012-12-20

Not sure I understand. Are there sort methods that don't use ascending/descending?


RE: Container.SetSortDirection? - jmarshall - 2012-12-20

No, but one presumes you only want to change the direction for one particular sort mode, not for all of them.


RE: Container.SetSortDirection? - jingai - 2012-12-20

Oh, hmm. I actually never realized it stored the sort direction for each sort mode. Well, I in particular just wanted to be able to change it for the current sort mode.

edit: Basically, exactly how Container.SortDirection toggles it, only to be able to jam it to one or the other too. If Container.SortDirection() was modified to accept a parameter, that would do the trick for me.


RE: Container.SetSortDirection? - jingai - 2013-05-07

Just bumping this.. I'd still really like to implement this in my addon. The default sort direction is basically wrong for this type of application (photo viewer) and it's a tad annoying to have to change it for every album.