2012-02-18, 14:54
Here you go.
In the method "_get_roms"
around the if statement add the following lines (ignore the if statement)
This will allow sorting by Title/Year/Studio/Genre for the ROM screen
For sorting the launchers, in the method "_get_launchers" under the if statement, add the following (ignore the if)
This will enable sorting by Title/Year (I couldn't think of any other proper way to sort launchers or emulators)
I notice while skimming the code that you have sorting, maybe you should remove all sorting, and leave this to XBMC as it surely will be more efficient. But the above will sort that out for now.
In the method "_get_roms"
around the if statement add the following lines (ignore the if statement)
Code:
if (len(roms) > 0) :
xbmcplugin.addSortMethod(int( self._handle ), xbmcplugin.SORT_METHOD_LABEL)
xbmcplugin.addSortMethod(int( self._handle ), xbmcplugin.SORT_METHOD_VIDEO_YEAR)
xbmcplugin.addSortMethod(int( self._handle ), xbmcplugin.SORT_METHOD_STUDIO)
xbmcplugin.addSortMethod(int( self._handle ), xbmcplugin.SORT_METHOD_GENRE)
For sorting the launchers, in the method "_get_launchers" under the if statement, add the following (ignore the if)
Code:
if (len(self.launchers) > 0):
xbmcplugin.addSortMethod(int( self._handle ), xbmcplugin.SORT_METHOD_LABEL)
xbmcplugin.addSortMethod(int( self._handle ), xbmcplugin.SORT_METHOD_VIDEO_YEAR)
I notice while skimming the code that you have sorting, maybe you should remove all sorting, and leave this to XBMC as it surely will be more efficient. But the above will sort that out for now.