Jump to content


nautilus7

Member Since 8 Sep 2012
Offline Last Active Today, 01:22
-----

Topics I've Started

Loading plugin pixmaps from skin path first, then fallback to plugin path - What's...

11 November 2019 - 23:34

So, let's say a plugin needs to load some pixmaps for its skin. It can look up in the plugin director to load the pixmaps provided by the plugin, or look up in the skin directory to load the pixmaps provided by the skin.

 

This could be done like this:

# first check if current skin provides the icon
icon = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "icons/pluginName/icon.png"))

# fallback to icon supplied by the plugin
if icon is None:
     icon = LoadPixmap(resolveFilename(SCOPE_CURRENT_PLUGIN, "pluginName/icons/icon.png"))

The above work fine, but if the skin does not provides the icon, then we get an message in the debug log (icon not found)... Is there a way to do the same, but without getting the error message in the log?

 

In general, is there a more efficient or faster way to do it? 


Allowing skins to set the frontendInfo colors...

10 November 2019 - 13:20

Hi, I am trying to adjust the python code, so skins will be able to set the frontendinfo colors, via a skin parameter. I can't seem to make it work though.

 

My changes are here: https://github.com/n...c4b9cdc58a664ce

 

The hex2str color conversion function is taken from here: https://github.com/O...tEpgInfo.py#L72

 

In my test code, I can't even get the the print calls to work. I get no output from these print functions (in debug level), as if they are not there... Any ideas?