2019-09-29, 18:20
I'm set label2mask property for the sorth method with xbmcplugin.addSortMethod.
For movies 'Label2' is filled correctly.
But for the TV shows 'Label2' is not filled.
Here is example of my code:
What I need to do so that 'Label2' is filled for a TV show?
For movies 'Label2' is filled correctly.
But for the TV shows 'Label2' is not filled.
Here is example of my code:
Here is full addon: plugin.video.testlabel2.zippython:def list_movies():
# Movie item
list_item = xbmcgui.ListItem(label='Movie Item')
list_item.setInfo('video', {'title': 'Movie Item',
'year': 2019,
'mpaa': '18+',
'mediatype': 'movie'})
list_item.setProperty('IsPlayable', 'true')
url = ''
is_folder = False
xbmcplugin.addDirectoryItem(_handle, url, list_item, is_folder)
# Folder settings
xbmcplugin.setContent(_handle, 'movies')
xbmcplugin.setPluginCategory(_handle, 'Movies')
xbmcplugin.addSortMethod(_handle, xbmcplugin.SORT_METHOD_NONE, '%Y / %O')
xbmcplugin.endOfDirectory(_handle)
def list_tvshows():
# TV Show item
list_item = xbmcgui.ListItem(label='TV Show Item')
list_item.setInfo('video', {'title': 'TV Show Item',
'year': 2019,
'mpaa': '18+',
'mediatype': 'movie'})
url = ''
is_folder = True
xbmcplugin.addDirectoryItem(_handle, url, list_item, is_folder)
# Folder settings
xbmcplugin.setContent(_handle, 'tvshows')
xbmcplugin.setPluginCategory(_handle, 'TV Shows')
xbmcplugin.addSortMethod(_handle, xbmcplugin.SORT_METHOD_NONE, '%Y / %O')
xbmcplugin.endOfDirectory(_handle)
What I need to do so that 'Label2' is filled for a TV show?