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
#5
(2019-02-12, 23:57)ronie Wrote: yup, an image resource addon is the way to go.
I've been unable to use it. I've created a weather icons resource and Kodi detects it, but there is no way I can set it to be used on my weather addon. Even for Weather Icons HD Animated I can't find a way to set them.
(2019-02-12, 23:57)ronie Wrote: 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
This is complicated as my weather provider exposes more (or at least different) weather situations, I would prefer to be able to pass its own code and let the icons resource match it.
Reply
#6
it's up to the skin you're using to decide which image resource it uses for weather icons.
some skins have it hardcoded, some will offer the user to select one.

..and as said, mapping the weather codes from your provider to the ones used by kodi is the only option.
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
#7
I'm using the default skin, isn't that supported on it?
Reply
#8
nope, it's hardcoded in the estuary skin.
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