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.
Is the script actually working? (Are your menu's being built, the menu customiser showing, etc?) It looks like an expected error where the .hash file doesn't exist - a hang-up of the early days of the script where speed was everything and tests showed it was quicker to let it fail than to check whether the file exists first - and shouldn't actually affect script operation.

Specifically in this case the script is checking whether the menu needs to be built, and is looking for its file which tells it what information it used to build the menu last time (so it can check that the .DATA.xml files haven't changed, for example, and that its still running the same skin version). If that line of code fails the traceback is printed to the log, but the script takes it as a sign that the menu does indeed need to be built, and moves on to doing that.

If that's not actually happening something more serious is going wrong, and so a full debug log (wiki) (including enabling the scripts own debug logging) is needed as the problem isn't where that debug log snippet indicates it is Smile

The latest version of the script has been in a beta for about a month, rather than releasing a safe/bleeding edge version. Unfortunately it's never until these things get into wide circulation that all issues come to light. Maybe next time, a wider beta Wink
I'm confused. How do I fix my missing submenus? The option to rollback is greyed out. I'm running 15.2rc2
Sorry, I can't comment on the rollback option. I see from your posts your using Nox5. As that's been updated on Isengard to use the newer file format for default submenus (support for the - now very old - .shortcuts files that skinshortcuts use has been dropped which is what appears to have caused missing submenus for some), I presume you're using a mod that hasn't been updated.

If that's correct, as a workaround you can copy and paste the .DATA.xml files from the official Nox5 skins shortcuts folder into the same folder of the mod your using. Alternatively you could create your own submenu's. Also please say which mod you're using so I can reach out to the creator to help get their mod updated to the newer file format.

If I'm not right about you using a mod, then this is a different issue than I've seen so far, so will need a debug log to know what is going on - if providing a debug log on the issue, please enable the scripts own debug logging option from its settings in additional to Kodi's and delete the contents of the script.skinshortcuts folder in the addon_data folder within the Userdata (wiki) folder (to trigger the script to try to rebuild the submenus).
(2015-09-23, 03:29)DAlba Wrote: [ -> ]I'm confused. How do I fix my missing submenus? The option to rollback is greyed out. I'm running 15.2rc2

The skin you're using needs to implement the changes in the skinshortcuts script.
We have checked/informed all official skins about the changes but we cannot track every single mod there is, we expect the skin devs to keep an eye on script changes they support in their skins.

Current version 0.5.4 on Helix repo is just the previous version (with the legacy support).
Version 0.6.x is the new version on isengard/Jarvis repo which has the new features and no more support for the legacy submenus.

If you run into any issues please contact the skin developer as this thread is meant for skinners only.
See first post: Users having issues should first post on the skin thread, if they don't get a valid response they can post here.,
(2015-09-23, 05:03)BobCratchett Wrote: [ -> ]Sorry, I can't comment on the rollback option. I see from your posts your using Nox5. As that's been updated on Isengard to use the newer file format for default submenus (support for the - now very old - .shortcuts files that skinshortcuts use has been dropped which is what appears to have caused missing submenus for some), I presume you're using a mod that hasn't been updated.

If that's correct, as a workaround you can copy and paste the .DATA.xml files from the official Nox5 skins shortcuts folder into the same folder of the mod your using. Alternatively you could create your own submenu's. Also please say which mod you're using so I can reach out to the creator to help get their mod updated to the newer file format.

If I'm not right about you using a mod, then this is a different issue than I've seen so far, so will need a debug log to know what is going on - if providing a debug log on the issue, please enable the scripts own debug logging option from its settings in additional to Kodi's and delete the contents of the script.skinshortcuts folder in the addon_data folder within the Userdata (wiki) folder (to trigger the script to try to rebuild the submenus).

Thank you so much I will try that. Unfortunately I am not sure if my skins creator is still activeSad
I am using a mod by Funkd here: http://forum.kodi.tv/showthread.php?tid=229199
Hi. One question, didn't tried yet but before starting to modify everything, I would like to know if templates accept $PARAM values ?

I mean something like this :

Code:
<include name="VDOViewtype">

            <param name="Id" value="50" />

            <param name="IclPrefix" value="VDOView1" />

            <param name="CompPrefix" value="VDO.View1" />

            <param name="Section" value="VDO" />

            <param name="Content" value="$SKINSHORTCUTS[path]" />

        </include>

Thanks
If I'm understanding your question correctly then no, the $SKINSHORTCUTS[] properties can only be used within the template.xml file - when the template gets built they are replaced with the value from the <property /> elements in the template so aren't available to the regular skin gui xml.

Edit:- I think I am misunderstanding your question. You want to use an include with params from a template, right? Yes, that's doable. You can use the $SKINSHORTCUTS[] properties in any elements attribute (as your example shows) or as the text of any element (<element>$SKINSHORTCUTS[]</element>). The big limitation is it must be the only thing in the attribute/text - though that limitation is removed with the git version of the script.
(2015-09-23, 22:09)BobCratchett Wrote: [ -> ]If I'm understanding your question correctly then no, the $SKINSHORTCUTS[] properties can only be used within the template.xml file - when the template gets built they are replaced with the value from the <property /> elements in the template so aren't available to the regular skin gui xml.
Hmm, that's a shame, I had a pretty straight forward solution to extend all my parameters to the Home menu with this. However, since $PARAM value is solved before passing to the include, maybe it will be solved in the template and then already translated when include reads it ? It's worth giving this a try ...


EDIT : Ha ... saw your edit just now Wink Will check tomorrow. Such trick would allow me to embbed my whole parametric viewtype directly in Home giving even more customization posibilities. Sounds like a refactor :p. Thanks Bob.
So my issue in the end was that I was calling a menu reset, then an "ok", but then calling a rebuild level 1, (i must have seen that in an old readme or something.) I stopped using level=1 and used level=0 and all is well.

Thanks guys.
(2015-09-23, 22:09)BobCratchett Wrote: [ -> ]Edit:- I think I am misunderstanding your question. You want to use an include with params from a template, right? Yes, that's doable. You can use the $SKINSHORTCUTS[] properties in any elements attribute (as your example shows) or as the text of any element (<element>$SKINSHORTCUTS[]</element>). The big limitation is it must be the only thing in the attribute/text - though that limitation is removed with the git version of the script.

Hehe ! It works Bob Smile
Now that I have viewtypes working like MyXXXNav.xml Windows, I need to declare which one is attached to which menu item. That's where I,m coming back with my 404 button Cool (which is not that much documented). I would like to set a new property per item as follow :

Code:
<property name="ViewType">MY_VIEWTYPE_NUMBER</property>

They should be selectable from number 1 to 9 only if !IsEmpty(Skin.String(HOM.ViewX.Name)) ...

Can you guys help me with the 404 button to achieve this ?
Thanks.

EDIT :

I've set my overrides as follow :

Code:
<propertydefault property="viewtype">$INFO[Skin.String(HOM.View1.Name)]</propertydefault>
    <property property="viewtype">$INFO[Skin.String(HOM.View1.Name)]</property>
    <property property="viewtype">$INFO[Skin.String(HOM.View2.Name)]</property>
    <property property="viewtype">$INFO[Skin.String(HOM.View3.Name)]</property>
    <property property="viewtype">$INFO[Skin.String(HOM.View4.Name)]</property>
    <property property="viewtype">$INFO[Skin.String(HOM.View5.Name)]</property>
    <property property="viewtype">$INFO[Skin.String(HOM.View6.Name)]</property>
    <property property="viewtype">$INFO[Skin.String(HOM.View7.Name)]</property>
    <property property="viewtype">$INFO[Skin.String(HOM.View8.Name)]</property>
    <property property="viewtype">$INFO[Skin.String(HOM.View9.Name)]</property>

But nothing happens when clicking the 404 button, I think the chooseProperty is missing but I didn't find where and how to set it ?

Cheers

EDIT 2 :

Well finally got it to work with checking the code in TITAN skin with onclick in the 404 button :

Code:
<onclick>SetProperty(chooseProperty,viewtype)</onclick>

This should be added in the documentation I think Wink
But my problem is now that it seems that $INFO[Skin.String(MY_STRING)] is not translated, it appears as is in my list ? Rolleyes
Have an idea ?

Thanks
@Jayz2K - can you try the branch here - it has changes to the custom properties which should enable you to do what you want:-

Code:
<property property="[Property]" label="[label]">[Property Value]</property>

[Property] - The property of the shortcut that will be set
[label] - [Optional] The label that will be displayed to the user. If ommitted, the [Property value] will be used.
[Property Value] - The default value of the property

The new 'label' attribute will be translated if it's an $INFO, so an updated entry in your overrides could look like...

Code:
<property property="viewtype" label="$INFO[Skin.String(HOM.View1.Name)]">1</property>

...which should show the view name to the user, but actually set the viewtype property to "1".

It also has a new propertySettings element which should help with another issue I know you've been having, as it allows you to enable browsing for an image...:-

Code:
<propertySettings property="[Property]" title="[Dialog title]" showNone="[True/False]" imageBrowse="[True/False]" />

[Property] - The property of the shortcut that will be set
[Dialog title] - [Optional] The title of the dialog that will be shown to the user
[True/False] - [Optional] A boolean indicating whether a None option will be shown, and whether the user will be able to browse for an image or folder of images

Note:- showNone defaults to True, imageBrowse defaults to False

If you can confirm it working (and doing what you need, and if you could also give the updated documentation a quick glance Wink), I'll do a PR.
Excellent Bob Big Grin

Will give this a try when back home.
However I'm asking myself if the second mode uses also the 404 button ? Since I have plans to set the viewtype as property, can I also set the thumb as another one ?
I tried to play with the 404 button and it seems that more than one custom property can't be set with the same button.
Have the 404 button hidden somewhere offscreen, then have two separate buttons for each of the properties you want to set, then in each:-

<onclick>SetProperty(chooseProperty,[property you want to set])</onclick>
<onclick>SendClick(404)</onclick>

Edit:- Y'know, I think it can and should be simpler than that. I've added an additional attribute to the <propertySettings /> called buttonID - set it to the ID of the button you'd like to use to set the custom property and the script will then manage any click to that button itself, no need to start setting window properties or sending clicks to 404. See updated docs on the branch for details.
Brilliant ! Wink Thanks
(2015-09-24, 13:37)BobCratchett Wrote: [ -> ]@Jayz2K - can you try the branch here - it has changes to the custom properties which should enable you to do what you want:-

Code:
<property property="[Property]" label="[label]">[Property Value]</property>

[Property] - The property of the shortcut that will be set
[label] - [Optional] The label that will be displayed to the user. If ommitted, the [Property value] will be used.
[Property Value] - The default value of the property

The new 'label' attribute will be translated if it's an $INFO, so an updated entry in your overrides could look like...

Code:
<property property="viewtype" label="$INFO[Skin.String(HOM.View1.Name)]">1</property>

...which should show the view name to the user, but actually set the viewtype property to "1".

It also has a new propertySettings element which should help with another issue I know you've been having, as it allows you to enable browsing for an image...:-

Code:
<propertySettings property="[Property]" title="[Dialog title]" showNone="[True/False]" imageBrowse="[True/False]" />

[Property] - The property of the shortcut that will be set
[Dialog title] - [Optional] The title of the dialog that will be shown to the user
[True/False] - [Optional] A boolean indicating whether a None option will be shown, and whether the user will be able to browse for an image or folder of images

Note:- showNone defaults to True, imageBrowse defaults to False

If you can confirm it working (and doing what you need, and if you could also give the updated documentation a quick glance Wink), I'll do a PR.

Both are working great Bob, excellent job ! Nod
For the visibility condition of viewtype, do you think it's also possible to add something like this ?

Code:
<property property="viewtype" label="$INFO[Skin.String(HOM.View1.Name)]" condition="!IsEmpty(Skin.String(HOM.View1.Name))">1</property>

Or maybe just not showing if the label tag returned value is empty ?