本文整理汇总了Python中common.XBMCInterfaceUtils.updateListItem_With_VideoInfo方法的典型用法代码示例。如果您正苦于以下问题:Python XBMCInterfaceUtils.updateListItem_With_VideoInfo方法的具体用法?Python XBMCInterfaceUtils.updateListItem_With_VideoInfo怎么用?Python XBMCInterfaceUtils.updateListItem_With_VideoInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.XBMCInterfaceUtils
的用法示例。
在下文中一共展示了XBMCInterfaceUtils.updateListItem_With_VideoInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __processAndAddVideoInfo__
# 需要导入模块: from common import XBMCInterfaceUtils [as 别名]
# 或者: from common.XBMCInterfaceUtils import updateListItem_With_VideoInfo [as 别名]
def __processAndAddVideoInfo__(item, data):
video_info = findVideoInfo(data)
if video_info is None:
raise Exception(ExceptionHandler.VIDEO_PARSER_NOT_FOUND, 'Video information is not found. Please check other sources.')
if video_info.is_video_stopped():
raise Exception(ExceptionHandler.VIDEO_STOPPED, 'Video is either removed or not found. Please check other links.')
XBMCInterfaceUtils.updateListItem_With_VideoInfo(video_info, item.get_xbmc_list_item_obj())
qual = int(AddonContext().addon.getSetting('playbackqual'))
video_strm_link = video_info.get_video_link(DataObjects.VIDEO_QUAL_HD_1080)
if video_strm_link == None or qual != 0:
video_strm_link = video_info.get_video_link(DataObjects.VIDEO_QUAL_HD_720)
if video_strm_link == None or qual == 2:
video_strm_link = video_info.get_video_link(DataObjects.VIDEO_QUAL_SD)
if video_strm_link == None:
video_strm_link = video_info.get_video_link(DataObjects.VIDEO_QUAL_LOW)
item.get_moving_data()['videoStreamUrl'] = video_strm_link
示例2: __processAndAddVideoInfo__
# 需要导入模块: from common import XBMCInterfaceUtils [as 别名]
# 或者: from common.XBMCInterfaceUtils import updateListItem_With_VideoInfo [as 别名]
def __processAndAddVideoInfo__(item, data):
video_info = findVideoInfo(data)
if video_info is None:
raise Exception(ExceptionHandler.VIDEO_PARSER_NOT_FOUND, 'Video information is not found. Please check other sources.')
if video_info.is_video_stopped():
raise Exception(ExceptionHandler.VIDEO_STOPPED, 'Video is either Removed by hosting website. Please check other links.')
if video_info.get_video_link(DataObjects.XBMC_EXECUTE_PLUGIN) is not None:
item.get_moving_data()['pluginUrl'] = video_info.get_video_link(DataObjects.XBMC_EXECUTE_PLUGIN)
else:
if Container().getAddonContext().addon.getSetting('ga_video_title') == 'true':
Container().ga_client.reportContentUsage(video_info.get_video_hosting_info().get_video_hosting_name(), video_info.get_video_name())
XBMCInterfaceUtils.updateListItem_With_VideoInfo(video_info, item.get_xbmc_list_item_obj())
qual_set = Container().getAddonContext().addon.getSetting('playbackqual')
if qual_set == '':
qual_set = '0'
qual = int(qual_set)
video_strm_link = video_info.get_video_link(DataObjects.VIDEO_QUAL_HD_1080)
if video_strm_link is None or qual != 0:
video_strm_link = video_info.get_video_link(DataObjects.VIDEO_QUAL_HD_720)
if video_strm_link is None or qual == 2:
video_strm_link = video_info.get_video_link(DataObjects.VIDEO_QUAL_SD)
if video_strm_link is None:
video_strm_link = video_info.get_video_link(DataObjects.VIDEO_QUAL_LOW)
item.get_moving_data()['videoStreamUrl'] = video_strm_link