2019-05-16, 12:31
Hi!
I'm pretty new to the Kodi Addon business so please excuse any questions considered obvious.
I wrote a small picture plugin and some problems arose. Maybe you can help me and provide some links/pointers.
1. In the deepest view, I have
2. The external images I load are not that small and I realized it would be good if I start to cache them. First of all, is there a Kodi-builtin _magic_ I can trigger to cache the external images (their URLs do not change)? If not, is it valid to rely on other plugins like, e.g., script.common.plugin.cache, or should I use plain
3. Is it considered good practice to use Kodi plugin "routing" (script.module.routing), or should I stick to do the routing manually?
Thanks for your opinions.
I'm pretty new to the Kodi Addon business so please excuse any questions considered obvious.
I wrote a small picture plugin and some problems arose. Maybe you can help me and provide some links/pointers.
1. In the deepest view, I have
ListItem
s that directly point to an external URL (path=url
) that holds an image file (JPG). Now, if I click on one of them the view is _not_ changed and the image is _not_ "played", i.e., shown in full size. I've tried setProperty("IsPlayable", "true")
, I do setInfo(type="image", infoLabels={"FileName": item.label})
and <provides>image</provides>
but still the image won't be displayed full size. Am I missing something, potentially essential? Do I have to use setResolvedUrl()
?2. The external images I load are not that small and I realized it would be good if I start to cache them. First of all, is there a Kodi-builtin _magic_ I can trigger to cache the external images (their URLs do not change)? If not, is it valid to rely on other plugins like, e.g., script.common.plugin.cache, or should I use plain
xbmcvfs
and open/write
?3. Is it considered good practice to use Kodi plugin "routing" (script.module.routing), or should I stick to do the routing manually?
Thanks for your opinions.