From 9963ff06099c24da2b27fbba6965eebb72026783 Mon Sep 17 00:00:00 2001 From: faush01 Date: Sun, 11 Jan 2015 15:34:23 +1100 Subject: [PATCH] move sorting to top of function --- resources/lib/Functions.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/resources/lib/Functions.py b/resources/lib/Functions.py index a1eda84..1033ca6 100644 --- a/resources/lib/Functions.py +++ b/resources/lib/Functions.py @@ -718,6 +718,14 @@ def getContent(url, pluginhandle): printDebug("== ENTER: getContent ==") printDebug("URL: " + str(url)) + xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL) + xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_SORT_TITLE_IGNORE_THE) + xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_YEAR) + xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_GENRE) + xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_RATING) + xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_UNSORTED) + xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_NONE) + WINDOW = xbmcgui.Window(10000) WINDOW.setProperty("MBConContent", "true") @@ -750,13 +758,7 @@ def getContent(url, pluginhandle): xbmcplugin.endOfDirectory(pluginhandle, cacheToDisc=False) - xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_LABEL) - xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_SORT_TITLE_IGNORE_THE) - xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_YEAR) - xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_GENRE) - xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_VIDEO_RATING) - xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_UNSORTED) - xbmcplugin.addSortMethod(pluginhandle, xbmcplugin.SORT_METHOD_NONE) + if(progress != None): progress.update(100, __language__(30125))