Kodi Community Forum

Full Version: script.skinshortcuts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can you please let me know your build line (RunScript(script.skinshortcuts,type=buildxml)) and the buttons <onclick>.

(There are essentially two reasons why the .properties file isn't read - there's no .DATA.xml file for the group being written in the addon_data folder, or the .properties file can't be read. As it works some of the time, we can pretty much eliminate the second. Meaning there's something about the way your skin is using the script which means my initial workaround of the first failed. With that information, I may be able to recreate the problem and work out what!)
Code:
<onload>RunScript(script.skinshortcuts,type=buildxml&amp;mainmenuID=9000)</onload>
?

b.t.w, heres the commit with the relevant stuff: https://github.com/tomer953/skin.phenome...258d8afdcd
I am passing the onclick to a custom dialog, but it's working fine - so don't let it confuse you.
If you want the easiest test, I can give you a download link to a sample icon+backgrounds packs so you can check it...
I can't reproduce the problem, and I'm short on time to do so this evening, so I've made one more attempt (hopefully more robust than last time) in making sure that the .DATA.xml files are in the addon_data directory and added some extra logging. When it doesn't work for you, please get me another debug log and I'll have another pass at it tomorrow Smile

Edit:- Updated it again, but this time with actual Python code Blush
OK I tested lasted git now (saw your edits..).

I changed the packs again and again - they are working, then I reset my shortcuts to the defaults - and after I do so, they packs is no longer working.
so I'm almost sure now its related to the skin reset action.
debug log: http://xbmclogs.com/pdsbr18fs#line-2193

I will continue testing it tomorrow, if you have some questions about my code you can take a look in my github.
Thanks again...
OK, if I'm understanding the logs correctly, its because the some of the default properties - which we build a .properties file from if it doesn't exist before applying the new properties - has some empty values. From a quick look at your skin, I'd say its probably the icons. I've added some code which won't copy any empty properties and - fingers crossed - it should now work as expected. (Indeed, it should work well enough I can revert a little bit of code!)
YAY! It solved the problem...
I'm glad we(you) find it!

please ping me when it's available in the official version, so I can push that update too.

Thank you Bob! Much appreciated
Glad its working for you.

I don't have the memory to start pinging people when particular features go live. v1.0.7 has just been requested for the repo, so - assuming no objections are raised in the PR - it will be the first feature to be merged for v1.0.8 or whatever-version-number-it-has-got-to-when-it-finally-reaches-the-rep. The mailing list is the place to keep an eye on when that is requested/approved.
No problem.
small question if I may,
any way to set a property with $INFO, but the var as is, and not the returned value ?
ie:
Code:
$INFO[Window(Home).Property(SkinHelper.AllMusicBackground)]
I want this as my background, but not the actual value of it...
Hey !

Does anyone have an exemple of custom default properties (for first skin start) in their overrides I can check ? I've been looking the thread not that close those days and even if everything is in the readme, a concrete case is always a valuable additional help.

Thx
(2016-02-25, 21:44)Jayz2K Wrote: [ -> ]Hey !

Does anyone have an exemple of custom default properties (for first skin start) in their overrides I can check ? I've been looking the thread not that close those days and even if everything is in the readme, a concrete case is always a valuable additional help.

Thx
in my skin I'm using default widgets,backgrounds,and icons
https://github.com/tomer953/skin.phenome...rrides.xml
it helps?
@tomer953 - Only if you can convince Kodi not to translate it. By the time it gets to the script its already too late.

@Jayz2K - How complicated do you want it? Mr. V's widgets use pretty much every feature available for custom properties, including fallbacks (which is what they're called in Skin Shortcuts parlance Wink), conditional fallbacks and requirements (so the property is only applied if the menu item has another property). But they're also complex!
@Bob :

Hmmm, that's a huge overrides.xml file lol.
I don't think I need that much.

I only want to set my viewtypes (3 available at startup : 1 for items without widgets, 1 for items with widgets that are not PVR, 1 for items with widgets that are PVR) and backgrounds if not already set (I should be fine with a single one for all items).

Will take a closer to that file, thx Wink

EDIT : @Bob & tomer : Thx guys, I think I manage to get something matching what I wanted to Smile
(2016-02-25, 21:49)BobCratchett Wrote: [ -> ]@tomer953 - Only if you can convince Kodi not to translate it. By the time it gets to the script its already too late.

seems that it is not that easy...
please take a look here:
http://forum.kodi.tv/showthread.php?tid=...pid2260817

thoughts ?
Thoughts? It's a shame, but if a workaround is needed script-side then so be it. I've just updated the code to accept - within the values only:-

Code:
::INFO::[Window(Home).Property(SkinHelper.AllMusicBackground)]

As always, its appreciated if you can test and confirm it works.
I tested, it's working.
thank you Bob.

sorry for being rude, but you have an approximate time estimate when you will send it to the official repo?
I saw that yesterday version 1.0.7 has been approved, and I just want to adjust myself, because my next update of my skin is relay on that feature.