<preloaditems> not working
#1
I have the following XML that is working quite well for displaying full screen images in a Panel. The issue I'm facing is that when I scroll right and reach an image that I've not seen before, then it takes a couple of seconds to load. ( for images watched earlier, the cache is able to serve it almost immediately). I've set preloaditems to 5 but that didn't help. For new set of images even if I give it a few seconds before scrolling right, it still takes the same amount of time to load and show the image.

Here is the section of XML code for the panel I'm using:

https://paste.ubuntu.com/p/bsTh7wByzQ/

This is called upon from a Python addon which uses XBMC GUI to populate this panel and adds the property "urlToMediaFile" to listItems. Please advice how do I get these images to be preloaded or added to cache so they can be immediately loaded.

I have thousands of images, so they all cannot be a part of cache. If preload images with a count works in this case, then that's all I need. But if it cannot do that, then programmatically adding and removing images from cache is acceptable too. 

Thanks in advance.
Reply
#2
the max value of <preloaditems> is 2, setting it to a higher value has no effect.

try if using <texture background="true">$INFO[ListItem.Property("urlToMediaFile")]</texture> instead of <info>ListItem.Property("urlToMediaFile")</info> works any better for you.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Thanks Ronie.

I tried it, and it did not make any difference. The new images still take a couple of seconds to load.

For the ListItem.Property("urlToMediaFile") the value is actually a URL to the image. Since the image is on the same physical machine as this Kodi, I can even provide a direct path, without the http. But when I tried that it didn't work. Does this have to be an HTTP URL ? If it can be a direct path, what kind of value should I provide.
Reply
#4
Nevermind about the direct path to file. I tried it and that didn't help either. I'm somehow not able to get any preloading done. 

I couldn't find any documentation on Preloading, If you know any, can you please point me towards it?
Reply
#5
Afaik, preloaditems ONLY works for images with the background="true" attribute set in the texture tag (as Ronie pointed out) e.g.
Code:
<texture background="true">$INFO[ListItem.Property("urlToMediaFile")]</texture>

Documentation on preloaditems is fairly minimal. There is a brief mention in the Background Image Loader wiki entry, but that's all I know about:
https://kodi.wiki/view/Background_Image_Loader
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#6
It's got to be the way Kodi is getting the listitems as fullscreen fanart has no such problems.
Reply

Logout Mark Read Team Forum Stats Members Help
<preloaditems> not working0