Add examples for setPluginCategory and setContent functions
This commit is contained in:
parent
8778f4e414
commit
a153be8e01
12
main.py
12
main.py
|
|
@ -111,6 +111,12 @@ def list_categories():
|
||||||
"""
|
"""
|
||||||
Create the list of video categories in the Kodi interface.
|
Create the list of video categories in the Kodi interface.
|
||||||
"""
|
"""
|
||||||
|
# Set plugin category. It is displayed in some skins as the name
|
||||||
|
# of the current section.
|
||||||
|
xbmcplugin.setPluginCategory(_handle, 'My Video Collection')
|
||||||
|
# Set plugin content. It allows Kodi to select appropriate views
|
||||||
|
# for this type of content.
|
||||||
|
xbmcplugin.setContent(_handle, 'videos')
|
||||||
# Get video categories
|
# Get video categories
|
||||||
categories = get_categories()
|
categories = get_categories()
|
||||||
# Iterate through categories
|
# Iterate through categories
|
||||||
|
|
@ -149,6 +155,12 @@ def list_videos(category):
|
||||||
:param category: Category name
|
:param category: Category name
|
||||||
:type category: str
|
:type category: str
|
||||||
"""
|
"""
|
||||||
|
# Set plugin category. It is displayed in some skins as the name
|
||||||
|
# of the current section.
|
||||||
|
xbmcplugin.setPluginCategory(_handle, category)
|
||||||
|
# Set plugin content. It allows Kodi to select appropriate views
|
||||||
|
# for this type of content.
|
||||||
|
xbmcplugin.setContent(_handle, 'videos')
|
||||||
# Get the list of videos in the category.
|
# Get the list of videos in the category.
|
||||||
videos = get_videos(category)
|
videos = get_videos(category)
|
||||||
# Iterate through videos.
|
# Iterate through videos.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue