(2023-09-23, 18:01)jepsizofye Wrote: my intuition here is telling me that a sleep() is blocking the thread execution "just enough" to where it doesn't update until after the function returns
the same thing that would call for the use of "sys.stdout.flush" in other scenarios for example
are you trying the threading timer or the original xbmc.sleep()?
So I moved the sleep timer outside of the slideWindow class used a nonmodal window and added / manipulated the controlImage with the setImage command.
Sample Timed Slideshow:
def ShowSlide(piclist, slidetime, ssmode): # Slidehow viewier
slideIdx = 0
slwindow = SlideWindow()
xbmc.executebuiltin('Dialog.Close(all, true)')
x = slwindow.getWidth()
y = slwindow.getHeight()
slwindow.show()
imgcontrol = xbmcgui.ControlImage(0, 0, x, y, "", 2)
slwindow.addControl(imgcontrol)
for x in range(len(piclist)):
playitem = picURL(piclist[x]['url']).strip('"')
xbmc.log('Mezzmo slide control showPic: ' + str(playitem) , xbmc.LOGINFO)
imgcontrol.setImage(playitem, False)
xbmc.sleep(slidetime * 1000)
del imgcontrol
del slwindow
This worked but still flickering between images but I don't think there is a fix for this because it leverages the Kodi image viewer which is loading a new image each time. Kodi doesn't support a picture playlist. This approach has two advantages over my
current JSON player method in that I can provide specific keyboard / remote commands that I want to honor and is uses a lot less / less complex code.
I'll need to play with this a bit more to see if it is worth the change.
Thanks for the nudge in the right direction. I tend to think more functionally vs. object based approach with my programming. I need to work on that.
Jeff
.