Your 2nd Add-On: Online Videos!
#59
For anybody trying to do this by iterating variables, I finally managed to do it, here's how I did it.
All you need is to make a for with 2 variables.

Code:

.
.
.
categories = get_categories()
numbers = [0, 1, 2]
# Iterate through categories
for category, number in zip(categories, numbers):
    # Create a list item with a text label and a thumbnail image.
    list_item = xbmcgui.ListItem(label=category)
    # Set graphics (thumbnail, fanart, banner, poster, landscape etc.) for the list item.
    # Here we use the same image for all items for simplicity's sake.
    # In a real-life plugin you need to set each image accordingly.
    list_item.setArt({'thumb': 'special://home/addons/plugin.video.myaddon/resources/icon' + str(number) + '.png',
                      'icon': 'special://home/addons/plugin.video.myaddon/resources/icon' + str(number) + '.png',
                      'fanart': 'special://home/addons/plugin.video.myaddon/resources/media/background.jpg'})
.
.
.
Reply


Messages In This Thread
Your 2nd Add-On: Online Videos! - by zag - 2015-11-20, 15:28
RE: Your 2nd Add-On: Online Videos! - by zag - 2015-11-20, 15:33
RE: Your 2nd Add-On: Online Videos! - by zag - 2015-11-30, 14:42
RE: Your 2nd Add-On: Online Videos! - by zag - 2015-12-01, 12:58
RE: Your 2nd Add-On: Online Videos! - by zag - 2016-01-18, 14:37
RE: Your 2nd Add-On: Online Videos! - by Petes - 2018-08-26, 07:39
RE: Your 2nd Add-On: Online Videos! - by pa79 - 2020-09-09, 19:59
Logout Mark Read Team Forum Stats Members Help
Your 2nd Add-On: Online Videos!2