本文整理汇总了Python中xbmcplugin.SORT_METHOD_VIDEO_RATING属性的典型用法代码示例。如果您正苦于以下问题:Python xbmcplugin.SORT_METHOD_VIDEO_RATING属性的具体用法?Python xbmcplugin.SORT_METHOD_VIDEO_RATING怎么用?Python xbmcplugin.SORT_METHOD_VIDEO_RATING使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类xbmcplugin
的用法示例。
在下文中一共展示了xbmcplugin.SORT_METHOD_VIDEO_RATING属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setSortMethodsForCurrentXBMCList
# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_VIDEO_RATING [as 别名]
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)
示例2: setSortMethodsForCurrentXBMCList
# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_VIDEO_RATING [as 别名]
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)
示例3: kodi_draw_list
# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_VIDEO_RATING [as 别名]
def kodi_draw_list(parts, rows):
for row in rows:
xbmcplugin.addDirectoryItem(*row.item(parts))
xbmcplugin.addSortMethod(h, xbmcplugin.SORT_METHOD_UNSORTED)
xbmcplugin.addSortMethod(h, xbmcplugin.SORT_METHOD_LABEL)
xbmcplugin.addSortMethod(h, xbmcplugin.SORT_METHOD_VIDEO_RATING)
xbmcplugin.addSortMethod(h, xbmcplugin.SORT_METHOD_VIDEO_YEAR)
xbmcplugin.addSortMethod(h, xbmcplugin.SORT_METHOD_DATE)
xbmcplugin.setContent(h, 'files')
xbmcplugin.endOfDirectory(h)
示例4: set_view
# 需要导入模块: import xbmcplugin [as 别名]
# 或者: from xbmcplugin import SORT_METHOD_VIDEO_RATING [as 别名]
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 )