2015-09-19, 11:21
(2015-09-17, 17:27)marcelveldt Wrote: 1) I have just adjusted the calculation of the resolution, you were right, it was just returning the height while Kodi has some logic in place to convert the width+height to a resolution that makes sense. I have implemented that exact same logic now in the helper so it should return the same values as native Kodi does for items in the library. Please test latest git of the script.
2) 500 items in a widget ? That's a bit insane don't you think ? For speed reasons keep it so a low number like 25 or something.
And about that count beiing 407, I think you just have 407 channels (with info)
3) You can't use that to show a textbox, that content pluginpath is to be used with a list container. If you just need the text to be displayed in a label/textbox, use the window prop SkinHelper.ListItemCast, note that you need need to add a (fake) list to trigger the plugin, it isn't set by the background service.
1) something wrong in code,not working at all for movie set...
PHP Code:
height = stream.get("height","")
width = stream.get("width","")
if height and width:
resolution = ""
if width <= 720 & height <= 480: resolution = "480"
elif width <= 768 & height <= 576: resolution = "576"
elif width <= 960 & height <= 544: resolution = "540"
elif width <= 1280 & height <= 720: resolution = "720"
elif width <= 1920 & height <= 1080: resolution = "1080"
elif width * height >= 6000000: resolution = "4K"
WINDOW.setProperty('SkinHelper.MovieSet.' + str(count) + '.Resolution',resolution)
PHP Code:
height = stream.get("height","")
width = stream.get("width","")
resolution = ""
if width <= 720 and height <= 480: resolution = "480"
elif width >= 720 and height <= 576: resolution = "576"
elif width <= 960 and height <= 544: resolution = "540"
elif width <= 1280 and height >= 576: resolution = "720"
elif width >= 1920 and height >= 1080: resolution = "1080"
WINDOW.setProperty('SkinHelper.MovieSet.' + str(count) + '.Resolution',resolution)