Your 2nd Add-On: Online Videos!
#56
Hello, can you help me making every category's thumb and fanart different?

I believe that my problem is that the code is inside a for loop. The loop gets the first thumb of each category, but what I want is the loop to get different files, for example icon1.png, icon2.png, icon3.png.

Code:
# Iterate through categories
for category in categories:
# Create a list item with a text label and a thumbnail image.
list_item = xbmcgui.ListItem(label=category, thumbnailImage=VIDEOS[category][0]['thumb'])
# Set a fanart image for the list item.
# Here we use the same image as the thumbnail for simplicity's sake.
list_item.setProperty('fanart_image', VIDEOS[category][0]['thumb'])

I have tried this for the thumb but I can't get the for to increment the values:

Code:
icons = ++1
list_item = xbmcgui.ListItem(label=category, thumbnailImage='special://home/addons/plugin.video.myaddon/resources/icon' + str(icons) + '.png')

Is there a better way of doing it or can you help me fix the problem with my code?
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-20, 10:47
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