How to load custom icons on my weather addon?
#1
Hi there, I'm revamping my old weather addon that was not working lately. Due to a different weather codes that are used by the source of the weather information I've decided to get their icons and use them. The thing is that I'm not able to get Kodi to load them, it always returns
Code:
ERROR: CImageLoader:Big GrinoWork - Direct texture file loading failed for resource://resource.images.weathericons.default/path_to_icon

Icons are inside ./resources/media folder so I get this path using
__icons__ = xbmc.translatePath(os.path.join(__addonpath__, 'resources', 'media' ))

and then set the corresponding icon by
set_property('Daily.%i.OutlookIcon' %i, os.path.join(__icons__, "%i.png" %code))
Reply
#2
weather addons don't have to provide the path to the icons. that's handled by the skin.
see: 245717 (thread)
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
So the only way to use custom icons is to make an image resource addon? This icon pack won't be useful for other plugins as the forecast coding does not match.
Reply
#4
yup, an image resource addon is the way to go.
in addition you need to map the codes your weather provider uses to the standard used by kodi.
https://kodi.wiki/view/Weather_addons#Weather_Codes
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
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
How to load custom icons on my weather addon?00