Release Image Resource selection script
#1
in case you're interested, i've written a script that lets the user select a custom image resource addon.

the Image Resource Select Addon is available through the addon repo (for Jarvis and up).

it functions quite similar to the favourites addon. it pops-up a select dialog with all installed image resource addons of a certain type.
it will copy the selected addon to a skin string, that you can use to display the icons in your skin.

[Image: glL9A6v.jpg]
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
#2
I should have just waited a bit, haha. Ironically that is what my dialog looked like before I moved it into the sidebar. Will check it out, thanks!

Update: Replaced my custom dialog with the Image Resource Select script, works great!
Reply
#3
Ronie,

Yet again you come to our rescue. Was just about to code a custom dialog to look after this in my skin, so thanks for saving me some time. One quick request for your script if you could please, can you include a bool to show if the image resource is a flat directory or if it has sub directories. For example some weather icon sets are just one directory containing files named 01.png thru to NA.png and some are a series of directories name 01 to NA. It would be nice to be able to choose the correct syntax on a image control without having to ask the user what type of set it is.

Wyrm (your cheeky Antipodian mate)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#4
Ronie,

I guess as there are no image resources in the Isengard repo that the script is Jarvis only. I don't suppose if we asked nicely we could get the resources in Isengard repo as well? Or is there something else that is missing from Isengard to not allow this to work correctly?

Wyrm
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#5
(2015-09-11, 17:34)wyrm Wrote: Ronie,

I guess as there are no image resources in the Isengard repo that the script is Jarvis only. I don't suppose if we asked nicely we could get the resources in Isengard repo as well? Or is there something else that is missing from Isengard to not allow this to work correctly?

Wyrm
it just won't work as lot's of things are missing
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#6
Thx ronie, when using setaddon it bothered me that all artwork packs were visible. This is much better.
Reply
#7
(2015-09-11, 17:41)Martijn Wrote:
(2015-09-11, 17:34)wyrm Wrote: Ronie,

I guess as there are no image resources in the Isengard repo that the script is Jarvis only. I don't suppose if we asked nicely we could get the resources in Isengard repo as well? Or is there something else that is missing from Isengard to not allow this to work correctly?

Wyrm
it just won't work as lot's of things are missing
Martijn,

Thanks for the heads up, I guess it's back to alternate for Isengard but will definitely use for Jarvis.

Wyrm
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#8
(2015-09-11, 09:30)wyrm Wrote: One quick request for your script if you could please, can you include a bool to show if the image resource is a flat directory or if it has sub directories. For example some weather icon sets are just one directory containing files named 01.png thru to NA.png and some are a series of directories name 01 to NA. It would be nice to be able to choose the correct syntax on a image control without having to ask the user what type of set it is.

makes sense, i've added it.
v0.0.2 will be available through the addon repo within the next day.
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
#9
Thanks again for the script Ronie. Was just trying to implement weather fanart, but ran into an issue whenever trying to select resource.images.weatherfanart.multi. When I try to select it from DialogSelect.xml, the dialog stays visible and nothing happens. Then when I select a different weather fanart pack, the dialog closes and I get a notification that an error occurred (see debug log below).

Thought maybe there was an issue with my DialogSelect.xml, but tried it with another skin and had the same problem. I updated to the latest versions of the script and image pack from github. Please let me know if you need any more information. Thanks!

http://pastebin.com/EQASZk7K
Reply
#10
ah, thanx for the report. there's indeed some faulty code in the addon.
i'll fix it.
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
#11
(2015-09-18, 22:09)ronie Wrote: ah, thanx for the report. there's indeed some faulty code in the addon.
i'll fix it.

Thanks, tested and it is working now. It doesn't appear that Skin.String(foo.multi) ever gets filled when selecting resource.images.weatherfanart.multi though. I was able to get it to work by doing a string compare between my foo.path and the addon path.
Reply
#12
(2015-09-18, 23:19)braz Wrote: Thanks, tested and it is working now. It doesn't appear that Skin.String(foo.multi) ever gets filled when selecting resource.images.weatherfanart.multi though. I was able to get it to work by doing a string compare between my foo.path and the addon path.

ah, it's not a skin string. i now see i have listed this incorrectly in the README file.

it's a bool (as was requested)
(2015-09-11, 09:30)wyrm Wrote: can you include a bool to show if the image resource is a flat directory

so the proper check would be: Skin.HasSetting(Foo.multi)
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
#13
That's what I get for following the readme too closely, haha. Thanks for the quick fix!
Reply
#14
ronie, unless you change the line at 93
Code:
if path in MULTI:
                    xbmc.executebuiltin('Skin.SetBool(%s)' % (self.property + '.multi'))

to
Code:
if path in MULTI:
                    xbmc.executebuiltin('Skin.SetBool(%s)' % (self.property + '.multi'))
                else:
                    xbmc.executebuiltin('Skin.Reset(%s)' % (self.property + '.multi'))

then once you select a multi-image resource and it gets set to true, the setting can never be set back to false when selecting a non-multi-image pack.

Once I made the change the script worked perfectly. Thank you for making image pack selection so much easier. Smile
Using two 2820FYKH0 Intel NUCs, a Revo 1600, and a Foxconn NT-330i - All running OpenELEC. :)
Reply
#15
heh, i was adding custom weather icon support to my skin a few hours ago.
wish i read this post before i started pulling out my hair when things didn't work out.

a fixed version is in the addon repo now btw.


in case anyone already stumbled upon the following issue,
i'll also be changing some related stuf in the openweathermap addon,
as it currently provides hardcoded paths (resource://resource.images.weathericons.default/xx.png) to weather icons.
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
Image Resource selection script00