def create_listing(listing, succeeded=True, update_listing=False, cache_to_disk=False, sort_methods=None,
view_mode=None, content=None, category=None):
"""
Create and return a context dict for a virtual folder listing
:param listing: the list of the plugin virtual folder items
:type listing: list or types.GeneratorType
:param succeeded: if ``False`` Kodi won't open a new listing and stays on the current level.
:type succeeded: bool
:param update_listing: if ``True``, Kodi won't open a sub-listing but refresh the current one.
:type update_listing: bool
:param cache_to_disk: cache this view to disk.
:type cache_to_disk: bool
:param sort_methods: the list of integer constants representing virtual folder sort methods.
:type sort_methods: tuple
:param view_mode: a numeric code for a skin view mode.
View mode codes are different in different skins except for ``50`` (basic listing).
:type view_mode: int
:param content: string - current plugin content, e.g. 'movies' or 'episodes'.
See :func:`xbmcplugin.setContent` for more info.
:type content: str
:param category: str - plugin sub-category, e.g. 'Comedy'.
See :func:`xbmcplugin.setPluginCategory` for more info.
:type category: str
:return: context object containing necessary parameters
to create virtual folder listing in Kodi UI.
:rtype: ListContext
"""
return ListContext(listing, succeeded, update_listing, cache_to_disk,
sort_methods, view_mode, content, category)
评论列表
文章目录