Catching onAction events from an existing Kodi Window Id ?
#31
(2023-09-22, 17:56)jepsizofye Wrote: with your positioning code (that i copied from github yesterday) the offsets were off on the info panel, it centered it near the upper left corner
also due to my use of a higher resolution, which is likely single use and edge case anyway but in future-proofing who's to say skins won't start adopting 4K resolutions

I tested the slide information on my 4K setup. It was centered and very easy to read at 15; from a 65" display.


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#32
(2023-09-23, 01:05)jbinkley60 Wrote: Nice looking screen.  Even though the Mezzmo Kodi addon does a full sync with Kodi's video database I generally don't use the native mode Kodi interface and use the Mezzmo addon List / GUI mode.  I have a set of powerful smart and active playlists which make it very easy to quickly find things across my entire library.  I could do similar with your approach, using favorites to the Mezzmo smart / active playlists.  Your homescreen is organized more like a typical streaming service and is visually very appealing.    One of these days I'll spend more time on the user interface but managing it across many Kodi systems isn't what I'd be up for since I manage everything centrally right now.

thanks

everything is central from jellyfin on mine, you can point the home screen widgets to just about any path so you could put paths directed into the mezzmo addon instead of kodi library paths

anyway more so back on topic ...

 
(2023-09-23, 01:08)jbinkley60 Wrote: I tested the slide information on my 4K setup. It was centered and very easy to read at 15; from a 65" display.


well, must have been something i did, as long as it looks the way you want it to
Reply
#33
(2023-09-23, 01:51)jepsizofye Wrote: thanks

everything is central from jellyfin on mine, you can point the home screen widgets to just about any path so you could put paths directed into the mezzmo addon instead of kodi library paths

anyway more so back on topic ...

Yeah, you can do that with Mezzmo.  I've never done it with widgets, just favourites.  My point about centralized management is managing the skin changes (i.e. files, widgets, favourites etc..) across the Kodi clients.  I don't think there is a way to manage them centrally with Kodi.  I could build them into the Mezzmo Kodi addon but now it starts to look like one of the Plex addons which has its own GUI.  Lots to think about here.
 
(2023-09-23, 01:51)jepsizofye Wrote: well, must have been something i did, as long as it looks the way you want it to

Back on topic, I took your idea for maxing out at 8 lines for the picture description and have it working here.   It counts the lines, truncates after 8 and if there are more than 8 it adds the ...   I'll add a note to the wiki when I post this telling folks 8 lines max get displayed. 

I am having no luck with a sleep timer in the class for a timed slideshow.  No matter what I do if I add any type of sleep timer to the SlideWindow class it will only display the last image in the list.  I think I am going to try playing around with the multimage control.  It seems designed for this but I am not sure if it is being deprecated or not since it isn't listed in the current docs.


**update** - the multiimage control won't work  It is based upon images in a folder, like the Kodi player.  This won't work for a list of URLs which is why I went down this path initially.


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#34
(2023-09-23, 11:06)jbinkley60 Wrote: I took your idea for maxing out at 8 lines for the picture description and have it working here.

perfect
 
(2023-09-23, 11:06)jbinkley60 Wrote: I am having no luck with a sleep timer in the class for a timed slideshow.


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()?
Reply
#35
(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 far just the xbmc.sleep().  I believe you are correct on the cause.  I will look into your threading timer solution.  It is about the only option I have left aside from doing nothing and leaving as is.  I tried creating and destroying the SlideWindow class in a loop outside  of the class.  This worked but had the same expected flashing between images.   


Thanks,

Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#36
(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
.
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#37
(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 think I may have a solution to the flickering, using skin animations.  You can use setAnimations for a control and then set the animation like fade etc.  If I an get this working, it may be worth the code changes.  I can actually test this easily on the manual slide shower.


Jeff
Running with the Mezzmo Kodi addon.  The easier way to share your media with multiple Kodi clients.
Service.autostop , CBC Sports, Kodi Selective Cleaner and Mezzmo Kodi addon author.
Reply
#38
looks like you have a handle on it, ill be waiting to see what you come up with
Reply

Logout Mark Read Team Forum Stats Members Help
Catching onAction events from an existing Kodi Window Id ?0