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.
@MacGyver - we've had a second report of the same issue as you reported, albeit with a few more details. As we're trying to work out exactly what's going wrong, do you mind clarifying what exactly wasn't working before you changed the build line? (The new report is saying that, on logging in, Kodi is reverting to the default skin, showing the skin shortcuts build notification, then loading the selected skin - there's nothing in skin shortcuts which should* cause Kodi to revert to the default skin, so it would be good to know if it isn't an isolated case Smile) Cheers.

* Though of course we all know that what shouldn't happen is exactly what happens 99.9% of the time Wink

Edit:- From further discussions on the second case reported, it appears that is entirely an OSMC/user issue rather than a skin shortcuts one. However, I'm still interested in what issues you actually had, in case there are fixes we can put into the skin shortcuts script for the actual issue you experienced Smile
--

(I hate this forums editing functions Wink)
Please edit your posts to delete the log, then upload it somewhere like pastebin.com and post a link to it. Logs pasted into the forum like that are incredibly difficult to read. Once you've done that, I'll take a look at the log to see if I can see what the issue is.
[/quote]

Here is the error log from Aeon nox. I have tried uninstalling it and starting again, still getting the message unable to build menu.

[url=<iframe src="http://pastebin.com/embed_iframe.php?i=g5xbFP5e" style="border:none;width:100%"></iframe>]Error log[/url][/quote][/code]

[url=<script src="http://pastebin.com/embed_js.php?i=g5xbFP5e"></script>]Error Log[/url][quote='BobCratchett' pid='2115185' dateline='1443126364']

Error Log
(2015-09-26, 15:27)thilly Wrote: [ -> ]Please edit your posts to delete the log, then upload it somewhere like pastebin.com and post a link to it. Logs pasted into the forum like that are incredibly difficult to read. Once you've done that, I'll take a look at the log to see if I can see what the issue is.

Here is the error log from Aeon nox. I have tried uninstalling it and starting again, still getting the message unable to build menu.

[url=<iframe src="http://pastebin.com/embed_iframe.php?i=g5xbFP5e" style="border:none;width:100%"></iframe>]Error log[/url][/quote][/code]

[url=<script src="http://pastebin.com/embed_js.php?i=g5xbFP5e"></script>]Error Log[/url]
(2015-09-24, 22:26)BobCratchett Wrote: [ -> ]Error Log

One of the shortcuts in one of your submenu doesn't have an action associated with it. Easy fix would be to go through into each submenu's editor and - if no items appear in the list on the left - select "Reset shortcuts"; or delete the contents of the addon_data/script.skinshortcuts folder in your userdata (wiki) folder.

If you do want a shortcut which doesn't do anything when clicked, the custom action for it needs to be "noop".
Main menu could not be build:

http://pastebin.com/PVW78RjL

Encoding seems to be something new to you guys
(2015-09-27, 14:27)aqab0N Wrote: [ -> ]Encoding seems to be something new to you guys

In return, may I say that asking for assistance with an open source script which is both developed and supported in peoples spare time appears to be something new to you.

And actually, some of the contributors - roee88 for example, are very well versed in the subject, which doesn't mean they manage to track down every single instance in a script as complex as this (especially where the username has unicode characters in it, and may I say in advance, I look forward to all your reports to all of the different Kodi add-ons which - from my experience fixing similar issues in the early life of the script - will display similar errors in your situation) until they are reported.

Thanks for the bug report. The error will be fixed on git in due course.

Edit:- Though Marcelveldt is absolutely correct - feel free to PR a fix. I doubt any existing contributor will be rushing to fix this issue themselves.
(2015-09-27, 14:27)aqab0N Wrote: [ -> ]Main menu could not be build:



http://pastebin.com/PVW78RjL



Encoding seems to be something new to you guys

Feel free to fix it yourself and do a PR. Don't expect much support from the community if you're this rude!
Here you go:

script.skinshortcuts/resources/lib/xlmfunctions.py

Line 555
Old:
path = xbmc.translatePath( os.path.join( self.skinDir , resolution.attrib.get( "folder" ), "script-skinshortcuts-includes.xml").encode("utf-8") ).decode('utf-8')

New:
path = xbmc.translatePath( os.path.join( self.skinDir.decode("utf-8") , resolution.attrib.get( "folder" ).decode("utf-8"), "script-skinshortcuts-includes.xml").encode("utf-8") ).decode('utf-8')
Hi, is there a way to get the mainmenu item ID inside a template ?

I managed to attach my viewtypes to the template but if I select the same viewtypes for 2 widgets, only the first widget infos (Title, plot, etc.) is shown for both. This is mostly due to the fact they both use the same list ID in an include and include doesn't refresh.

My solution could be to change the list ID from template using the mainmenu item ID.
(2015-09-27, 18:10)aqab0N Wrote: [ -> ]Here you go:

script.skinshortcuts/resources/lib/xlmfunctions.py

Line 555
Old:
path = xbmc.translatePath( os.path.join( self.skinDir , resolution.attrib.get( "folder" ), "script-skinshortcuts-includes.xml").encode("utf-8") ).decode('utf-8')

New:
path = xbmc.translatePath( os.path.join( self.skinDir.decode("utf-8") , resolution.attrib.get( "folder" ).decode("utf-8"), "script-skinshortcuts-includes.xml").encode("utf-8") ).decode('utf-8')

Nice. The repo for you to do a PR against is https://github.com/BigNoid/script.skinshortcuts. Otherwise, I'll do a PR myself when I get time, which won't be for a few days. And let me say if that is the only fix needed for the script to work with usernames with unicode characters, I'm once again blown away by the amazing job those who have contributed to the unicode support so far have actually done.

(2015-09-27, 19:08)Jayz2K Wrote: [ -> ]Hi, is there a way to get the mainmenu item ID inside a template ?

I managed to attach my viewtypes to the template but if I select the same viewtypes for 2 widgets, only the first widget infos (Title, plot, etc.) is shown for both. This is mostly due to the fact they both use the same list ID in an include and include doesn't refresh.

My solution could be to change the list ID from template using the mainmenu item ID.

Sorry, no way to access that at the moment. Should be a fairly quick addition, though, so I'll do my best to add it to git tomorrow.
BobCratchett Wrote: [ -> ]Sorry, no way to access that at the moment. Should be a fairly quick addition, though, so I'll do my best to add it to git tomorrow.

Great, thx Bob Smile
That sounds interesting because when I tried to use templates some time ago for fTV I couldn't link the outputs to the main menu items.
That should be as simple as (though I appreciate these things never are) including <skinshortcuts>visibility</skinshortcuts> in the template. Being able to access the main menu id, though, will give lots more control over it.

It's also worth saying that the templates feature is still pretty green, so if you do have issues with or suggestions for it, feel free to hit me up here or on github.
(2015-09-28, 00:03)BobCratchett Wrote: [ -> ]That should be as simple as (though I appreciate these things never are) including <skinshortcuts>visibility</skinshortcuts> in the template. Being able to access the main menu id, though, will give lots more control over it.

It's also worth saying that the templates feature is still pretty green, so if you do have issues with or suggestions for it, feel free to hit me up here or on github.

For more explaination, what I already tried was something like that (which doesn't work) in template :

Code:
<other include="widget">
    <condition tag="property" attribute="name|viewtype">
    <property attribute="name|widgetPath" tag="property" name="path"/>
    <property attribute="name|widgetTarget" tag="property" name="target"/>
    <property name="target"/>
    <property name="compprefix" tag="property" attribute="name|viewtype">
    <property name="id" tag="property" attribute="name|viewtype">$INFO[Container(9000).CurrentItem,900,]</property>

    <controls>

        <control type="group">
            <skinshortcuts>visibility</skinshortcuts>
            <include name="HOMViewtype">
                <param name="Id" value="$SKINSHORTCUTS[id]" />
                <param name="CompPrefix" value="="$SKINSHORTCUTS[compprefix]" />
                <param name="Target" value="$SKINSHORTCUTS[target]" />
                <param name="Path" value="$SKINSHORTCUTS[path]" />
            </include>
        </control>
    </controls>
</other>

For now, CompPrefix works (custom properties set with 404 button for Skin.String($PARAM[CompPrefix].Value) in HOMViewtype) but I had to have a fixed Id 9011 that makes the container to refresh fine but not the infos (As I said, because it's the same include, first widget infos are kept in memory because of the same Id). HOMViewtype is not just a container but almost a whole window, so it also sets for example the $INFO[Container($PARAM[Id]).ListItem.Plot] outside the container.
Hope I made it clear enough Wink
I always love seeing the almost-ridiculously inventive things you skilled skinners come up with Nod A way to access the ID will be added this afternoon, though I'll contact you to test if that's ok, so we can make sure it does what you need before it gets merged Smile