Basically I want the user to be able to change the sorting of a video list sorting, but i don't want to alter the default sorting that YouTube provides as these are often sorted by something "YouTube specfic". In order to achieve this im currently add the following sort methods to all video lists:
Code:
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_PLAYLIST_ORDER )
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_LABEL )
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_VIDEO_RATING )
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_DATE )
xbmcplugin.addSortMethod( handle=int( sys.argv[ 1 ] ), sortMethod=xbmcplugin.SORT_METHOD_VIDEO_RUNTIME )Code:
case SORT_METHOD_PROGRAM_COUNT:
case SORT_METHOD_PLAYLIST_ORDER:
// TODO: Playlist order is hacked into program count variable (not nice, but ok until 2.0)
FillSortFields(SSortFileItem::ByProgramCount);
break;This seems to work fine at first, the video list is produced in the same order as if i had set it to SORT_METHOD_NONE but after cycling through all the sorting options I can't get the list to return to the original order.. Is this by design or am I doing something wrong?

![[Image: badge.gif]](http://www.ohloh.net/projects/9132/badge.gif)

Search
Help