def build_user_sub_listing(self, video_list_ids, type, action, build_url):
"""
Builds the video lists screen for user subfolders
(genres & recommendations)
Parameters
----------
video_list_ids : :obj:`dict` of :obj:`str`
List of video lists
type : :obj:`str`
List type (genre or recommendation)
action : :obj:`str`
Action paramter to build the subsequent routes
build_url : :obj:`fn`
Function to build the subsequent routes
Returns
-------
bool
List could be build
"""
for video_list_id in video_list_ids:
li = xbmcgui.ListItem(
label=video_list_ids[video_list_id]['displayName'],
iconImage=self.default_fanart)
li.setProperty('fanart_image', self.default_fanart)
url = build_url({'action': action, 'video_list_id': video_list_id})
xbmcplugin.addDirectoryItem(
handle=self.plugin_handle,
url=url,
listitem=li,
isFolder=True)
xbmcplugin.addSortMethod(
handle=self.plugin_handle,
sortMethod=xbmcplugin.SORT_METHOD_LABEL)
xbmcplugin.endOfDirectory(self.plugin_handle)
self.set_custom_view(VIEW_FOLDER)
return True
评论列表
文章目录