本文整理汇总了Python中common.XBMCInterfaceUtils.sortItems方法的典型用法代码示例。如果您正苦于以下问题:Python XBMCInterfaceUtils.sortItems方法的具体用法?Python XBMCInterfaceUtils.sortItems怎么用?Python XBMCInterfaceUtils.sortItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.XBMCInterfaceUtils
的用法示例。
在下文中一共展示了XBMCInterfaceUtils.sortItems方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: judgeTurtleNextAction
# 需要导入模块: from common import XBMCInterfaceUtils [as 别名]
# 或者: from common.XBMCInterfaceUtils import sortItems [as 别名]
def judgeTurtleNextAction(self, actionObj):
ProgressDisplayer().displayMessage(80, line1='Preparing items for display or play', line2='Total items: ' + str(len(self.response_obj.get_item_list())))
if self.response_obj.get_redirect_action_name() is None:
isAnyVideoItem = False
for item in self.response_obj.get_item_list():
nextActionId = actionObj.get_next_action_map()[item.get_next_action_name()]
if nextActionId == '__play__':
if not isAnyVideoItem:
XBMCInterfaceUtils.clearPlayList() #Clear playlist item only when at least one video item is found.
XBMCInterfaceUtils.addPlayListItem(item)
isAnyVideoItem = True
elif nextActionId == '__service_response__':
#Do Nothing , get response object from container for parameters to be returned
pass
else:
is_Folder = self.addon_context.isNextActionFolder(actionObj.get_action_id(), item.get_next_action_name())
XBMCInterfaceUtils.addFolderItem(item, nextActionId, is_Folder)
if isAnyVideoItem == True:
ProgressDisplayer().end()
XBMCInterfaceUtils.play()
else:
if self.response_obj.get_xbmc_sort_method() is not None:
XBMCInterfaceUtils.sortItems(self.response_obj.get_xbmc_sort_method())
if self.response_obj.get_xbmc_content_type() is not None:
XBMCInterfaceUtils.setContentType(self.response_obj.get_xbmc_content_type())
else:
redirectActionId = actionObj.get_redirect_action_map()[self.response_obj.get_redirect_action_name()]
self.response_obj.set_redirect_action_name(None)
return redirectActionId