Python xbmcplugin.SORT_METHOD_GENRE Examples

The following are 3 code examples of xbmcplugin.SORT_METHOD_GENRE(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module xbmcplugin , or try the search function .
Example #1
Source File: xbmcUtils.py    From filmkodi with Apache License 2.0 6 votes vote down vote up
def setSortMethodsForCurrentXBMCList(handle, sortKeys):
    
    def addSortMethod(method):
        xbmcplugin.addSortMethod(handle = handle, sortMethod = method)
    
    if not sortKeys or sortKeys==[]: 
        addSortMethod(xbmcplugin.SORT_METHOD_UNSORTED)
    else:     
        if 'name' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_LABEL)
        if 'size' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_SIZE)
        if 'duration' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_DURATION)
        if 'genre' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_GENRE)
        if 'rating' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_VIDEO_RATING)
        if 'date' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_DATE)
        if 'file' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_FILE) 
Example #2
Source File: xbmcUtils.py    From filmkodi with Apache License 2.0 6 votes vote down vote up
def setSortMethodsForCurrentXBMCList(handle, sortKeys):

    def addSortMethod(method):
        xbmcplugin.addSortMethod(handle = handle, sortMethod = method)

    if not sortKeys or sortKeys==[]:
        addSortMethod(xbmcplugin.SORT_METHOD_UNSORTED)
    else:
        if 'name' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_LABEL)
        if 'size' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_SIZE)
        if 'duration' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_DURATION)
        if 'genre' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_GENRE)
        if 'rating' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_VIDEO_RATING)
        if 'date' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_DATE)
        if 'file' in sortKeys:
            addSortMethod(xbmcplugin.SORT_METHOD_FILE) 
Example #3
Source File: addon.py    From plugin.git.browser with GNU General Public License v3.0 5 votes vote down vote up
def set_view(view_id, content=None):
	if content is not None:
		xbmcplugin.setContent(HANDLE_ID, content)

	xbmc.executebuiltin("Container.SetViewMode(%s)" % view_id)
	xbmcplugin.addSortMethod( handle=HANDLE_ID, sortMethod=xbmcplugin.SORT_METHOD_UNSORTED )
	xbmcplugin.addSortMethod( handle=HANDLE_ID, sortMethod=xbmcplugin.SORT_METHOD_LABEL )
	xbmcplugin.addSortMethod( handle=HANDLE_ID, sortMethod=xbmcplugin.SORT_METHOD_VIDEO_RATING )
	xbmcplugin.addSortMethod( handle=HANDLE_ID, sortMethod=xbmcplugin.SORT_METHOD_DATE )
	xbmcplugin.addSortMethod( handle=HANDLE_ID, sortMethod=xbmcplugin.SORT_METHOD_PROGRAM_COUNT )
	xbmcplugin.addSortMethod( handle=HANDLE_ID, sortMethod=xbmcplugin.SORT_METHOD_VIDEO_RUNTIME )
	xbmcplugin.addSortMethod( handle=HANDLE_ID, sortMethod=xbmcplugin.SORT_METHOD_GENRE )