Kodi Community Forum
sorting virtual folders - sort by label/default not working ? - 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: sorting virtual folders - sort by label/default not working ? (/showthread.php?tid=293037)



sorting virtual folders - sort by label/default not working ? - gordie - 2016-10-04

Hi guys !
Sorry if my question is not relevant, it's my first time coding in Python Smile

I forked a plugin and updated it, a Kodi addon to stream music from a Subsonic Server, (plugin.audio.subsonic).

The original plugin was broken, so I... unbroke it, but also rewrite a lot of stuff and add features including marking items as favorites(star) and downloading tracks / albums.
That was kind of fun.

But I have issues with sorting virtual folders...
Actually, I colorize list items labels if they are "starred" (marked as favorite); so it's easy to see if an item is favorited or not.

When sorting is disabled, it works fine.
But when I add sort methods, it all goes wrong : I can't see my "default" (colorized) labels anymore.
I understand that sorting by title,artist,album,date... changes the look of the list items, but I just would like to have a sort option that would display my default labels.

I did try with

Code:
xbmcplugin.SORT_METHOD_NONE,
        xbmcplugin.SORT_METHOD_LABEL,
        xbmcplugin.SORT_METHOD_UNSORTED

But:
* not any of my sorting options (using that code) do display my default labels
* I do not understand the difference between those methods.
* I think SORT_METHOD_NONE displays "Date" for the sort by parameter, which is a bug, is it ?

Anyway, could someone explain me if this is a bug or if there is a way to sort stuff by labels correctly ?

Thanks


RE: sorting virtual folders - sort by label/default not working ? - gordie - 2017-01-09

Still can't make this work. Anyone ?