本文整理汇总了Python中ChannelList.ChannelList.requestItem方法的典型用法代码示例。如果您正苦于以下问题:Python ChannelList.requestItem方法的具体用法?Python ChannelList.requestItem怎么用?Python ChannelList.requestItem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ChannelList.ChannelList
的用法示例。
在下文中一共展示了ChannelList.requestItem方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: APP
# 需要导入模块: from ChannelList import ChannelList [as 别名]
# 或者: from ChannelList.ChannelList import requestItem [as 别名]
#.........这里部分代码省略.........
infoList['premiered'] = 'premiered'
infoList['aired'] = 'aired'
infoList['code'] = 'code'
infoList['lastplayed'] = 'lastplayed'
# infoList['album'] = 'album'
# infoList['artist'] = ['artist']
# infoList['votes'] = 'votes'
infoList['duration'] = 1
infoList['year'] = 1977
infoList['season'] = 3
infoList['episode'] = 4
infoList['playcount'] = 5
self.Items.setInfo('Video', infoList)
infoArt = {}
infoArt['thumb'] = thumbnail
infoArt['poster'] = thumbnail
infoArt['banner'] = ''
infoArt['fanart'] = fanart
infoArt['clearart'] = ''
infoArt['clearlogo'] = ''
infoArt['landscape'] = fanart
infoList['icon'] = thumbnail
self.Items.setArt(infoArt)
self.PanelPlugins.addItem(self.Items)
def fillListItems(self, url, type='video', file_type=False):
self.log('fillListItems')
self.Items = []
if not file_type:
detail = uni(self.chanlist.requestList(url, type))
else:
detail = uni(self.chanlist.requestItem(url, type))
for f in detail:
files = re.search('"file" *: *"(.*?)",', f)
filetypes = re.search('"filetype" *: *"(.*?)",', f)
labels = re.search('"label" *: *"(.*?)",', f)
thumbnails = re.search('"thumbnail" *: *"(.*?)",', f)
fanarts = re.search('"fanart" *: *"(.*?)",', f)
descriptions = re.search('"description" *: *"(.*?)",', f)
if filetypes and labels and files:
filetype = filetypes.group(1)
name = self.chanlist.cleanLabels(labels.group(1))
file = (files.group(1).replace("\\\\", "\\"))
if not descriptions:
description = ''
else:
description = self.chanlist.cleanLabels(descriptions.group(1))
if thumbnails != None and len(thumbnails.group(1)) > 0:
thumbnail = thumbnails.group(1)
else:
thumbnail = THUMB
if fanarts != None and len(fanarts.group(1)) > 0:
fanart = fanarts.group(1)
else:
fanart = FANART
self.Items = xbmcgui.ListItem(label=name, thumbnailImage = thumbnail)
if filetype == 'file':
self.Items.setProperty('IsPlayable', 'true')