How to use Label2 for TV Shows?
#1
I'm set label2mask property for the sorth method with xbmcplugin.addSortMethod.
For movies 'Label2' is filled correctly.
Image
But for the TV shows 'Label2' is not filled.
Image
Here is example of my code:
python:
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)
Here is full addon: plugin.video.testlabel2.zip
What I need to do so that 'Label2' is filled for a TV show?
My addons: Gismeteo
Reply


Messages In This Thread
How to use Label2 for TV Shows? - by vl_maksime - 2019-09-29, 18:20
Logout Mark Read Team Forum Stats Members Help
How to use Label2 for TV Shows?0