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.
(2016-04-23, 22:57)willcmuk Wrote: [ -> ]Thanks Bob, I've implemented the first fix, I'll see if anyone on the artic zephyr board can help me with the template - thanks again!

Best of luck with what you want to achieve Smile

Particularly as you want to use templates to achieve your aims, it probably won't always be clear whether to post here or in a skin-related thread for assistance. Though I'm not available to give assistance for the next couple of days, know that even if you post in a place that is not necessarily appropriate, there are plenty of people who will direct you to the correct place for assistance, and will offer assistance when they are able Smile

It's still very complex what you want to achieve, and I can't wait to see you manage to do it Smile
(2016-04-23, 23:25)BobCratchett Wrote: [ -> ]
(2016-04-23, 22:57)willcmuk Wrote: [ -> ]Thanks Bob, I've implemented the first fix, I'll see if anyone on the artic zephyr board can help me with the template - thanks again!

Best of luck with what you want to achieve Smile

Particularly as you want to use templates to achieve your aims, it probably won't always be clear whether to post here or in a skin-related thread for assistance. Though I'm not available to give assistance for the next couple of days, know that even if you post in a place that is not necessarily appropriate, there are plenty of people who will direct you to the correct place for assistance, and will offer assistance when they are able Smile

It's still very complex what you want to achieve, and I can't wait to see you manage to do it Smile

@marcelveldt - with #159 being the only blocker - other than all the bugs that come up during the necessary beta - are we any nearer to updating the script on the repo...?
(2016-01-25, 19:31)BobCratchett Wrote: [ -> ]It's likely to be the known problem with some add-ons including YouTube which seems to be caused by the way they pass variables through the uri. For whatever reason, when they do it in the way that YouTube does it, Kodi uses a cached version when opening a link directly to it. To know whether it is this issue or not, look at the path for the shortcut - if it doesn't have a ?[variable]=[value] part at the end, it most likely is.

You can try and fool Kodi into not using a cached version by changing the action - 'Change Action' > 'Custom Shortcut >' (the last one in the list) and add a property to the path. So, YouTube's Popular Right Now would change from:-

Code:
ActivateWindow(10025,"plugin://plugin.video.youtube/special/popular_right_now/",return)

to something like:-

Code:
ActivateWindow(10025,"plugin://plugin.video.youtube/special/popular_right_now/?variable=$INFO[System.TotalUptime]",return)

(The name of the variable, nor the value, actually matter - though I like $INFO[System.TotalUptime] as it will always be different each time the shortcut is accessed, guaranteeing Kodi sees it as a fresh path each time and therefore can't use a cached version. But just ?a=1 should be enough for Kodi to not always use the cached version...)


Had same issue with some different plugins - THANKYOU @BobCratchett, been scratching my head over this one for some time!
Solution worked brilliantly!!
Hey Bob,
Today I moved my skin to use "templates" for widgets, I am really newbie with this, but from a very quick look in the example you put in the documentation, I think I figured it out.

I did it for adding "system info" and "weather" widgets easily, and it was pretty easy (using Titan as a reference).

so now, I am wondering about some things:
1. I noticed that now the widgets does not "refresh" when I navigate between menus, they "always there", while in the previous method they always reloaded when focus on menu items. it's awesome and make the skin looks faster, but they are refreshing in the background or something? should I do something to make them reload now?
2. I never used "target" property for widgets, in my previous method I used "video" as hard-coded target. so now I'm wondering, what's the difference between target "video" to "pictures" for example, if "video" is working fine for all? and the "real" problem now, that I have some widgets I previously defined in the overrides (and I guess a lot is still using them) without "target" property, so now, when clicking on item in those widgets - nothing happens.
example:
https://github.com/tomer953/skin.phenome...es.xml#L89 (edit, I just added the target with latest commit, so all the users still has it without target)
https://github.com/tomer953/skin.phenome...te.xml#L16

can I replace "$SKINSHORTCUTS[target]" with variable so it will fallback to "video", or somehow force the new widgets to overrides the old ones?
Hello all - further to my previous posts about a sub menu widget(s) in the Arctic Zephyr skin... I've managed the following:
- downloaded latest skin.shortcut for github
- got the widget and widget aspect buttons to appear in the submenu under Customise Home menu.
- created a template which is successfully outputting to skin-shortcuts-includes.xml

however the widget is still not being displayed, I've confirmed visibility settings and the general structure of the code are correct by the use of a dummy image, which appears as expected.

The bit that appears to be causing issues is this part in the template file

<property name="content" tag="property" attribute="name|widgetPath" />

if I hard code the attribute to a plugin url it is displayed which suggests there is an issue with the dynamic attribute and yet I've confirmed that in skin-shortcuts-includes.xml there is a property under the submenu id called widgetPath which is populated with the correct plugin url.

Has anyone got any ideas?

Also please can someone confirm this is the version I should be using from Github which Bob mentioned in an earlier post?
https://github.com/BigNoid/script.skinsh...master.zip
(2016-01-25, 19:31)BobCratchett Wrote: [ -> ]It's likely to be the known problem with some add-ons including YouTube which seems to be caused by the way they pass variables through the uri. For whatever reason, when they do it in the way that YouTube does it, Kodi uses a cached version when opening a link directly to it. To know whether it is this issue or not, look at the path for the shortcut - if it doesn't have a ?[variable]=[value] part at the end, it most likely is.

You can try and fool Kodi into not using a cached version by changing the action - 'Change Action' > 'Custom Shortcut >' (the last one in the list) and add a property to the path. So, YouTube's Popular Right Now would change from:-

Code:
ActivateWindow(10025,"plugin://plugin.video.youtube/special/popular_right_now/",return)

to something like:-

Code:
ActivateWindow(10025,"plugin://plugin.video.youtube/special/popular_right_now/?variable=$INFO[System.TotalUptime]",return)

(The name of the variable, nor the value, actually matter - though I like $INFO[System.TotalUptime] as it will always be different each time the shortcut is accessed, guaranteeing Kodi sees it as a fresh path each time and therefore can't use a cached version. But just ?a=1 should be enough for Kodi to not always use the cached version...)

A small PostScript question @BobCratchett
The only downside is that when launching the shortcut, it always comes up in (Default) 'List' view, since it is getting a fresh path each time;
Is there a way to modify the string further, so that when it opens, it displays directly in 'Panel' View?
(2016-04-25, 16:57)tomer953 Wrote: [ -> ]1. I noticed that now the widgets does not "refresh" when I navigate between menus, they "always there", while in the previous method they always reloaded when focus on menu items. it's awesome and make the skin looks faster, but they are refreshing in the background or something? should I do something to make them reload now?
2. I never used "target" property for widgets, in my previous method I used "video" as hard-coded target. so now I'm wondering, what's the difference between target "video" to "pictures" for example, if "video" is working fine for all? and the "real" problem now, that I have some widgets I previously defined in the overrides (and I guess a lot is still using them) without "target" property, so now, when clicking on item in those widgets - nothing happens.
example:
https://github.com/tomer953/skin.phenome...es.xml#L89 (edit, I just added the target with latest commit, so all the users still has it without target)
https://github.com/tomer953/skin.phenome...te.xml#L16

can I replace "$SKINSHORTCUTS[target]" with variable so it will fallback to "video", or somehow force the new widgets to overrides the old ones?

1. With widgets created with version 1.0.8 of the script, widgets powered by plugins (except for extended info) will refresh after media is playing. Other widgets, it's up to Kodi to manage when they're refreshed.

2. I suspect you'd need to ask in a more general thread what the difference is between targets if ones working well - ultimately they're a Kodi thing Smile You could add a fallback property in case it's not set:-

Code:
<property name="target" tag="property" attribute="name|widgetTarget" />
<property name="target">video</property>

(2016-04-25, 17:00)willcmuk Wrote: [ -> ]The bit that appears to be causing issues is this part in the template file

<property name="content" tag="property" attribute="name|widgetPath" />

if I hard code the attribute to a plugin url it is displayed which suggests there is an issue with the dynamic attribute and yet I've confirmed that in skin-shortcuts-includes.xml there is a property under the submenu id called widgetPath which is populated with the correct plugin url.

Has anyone got any ideas?

Also please can someone confirm this is the version I should be using from Github which Bob mentioned in an earlier post?
https://github.com/BigNoid/script.skinsh...master.zip

And what appears in the built template in the script-skinshortcuts-includes.xml file? (And yes, that's the zip for the latest version)

(2016-04-25, 18:50)DEcosse Wrote: [ -> ]A small PostScript question @BobCratchett
The only downside is that when launching the shortcut, it always comes up in (Default) 'List' view, since it is getting a fresh path each time;
Is there a way to modify the string further, so that when it opens, it displays directly in 'Panel' View?

Not that I know of. However, though I haven't had time to actually test this myself, I'm hoping the whole workaround is no longer needed as of Kodi v16.1.
awesome, thx... widgets as template was so easy to implement, I don't know why I scared from it so much Smile 10 lines of code and all is much more faster and easier to customize... awesome feature.
.....
(2016-04-25, 19:59)BobCratchett Wrote: [ -> ]..., I'm hoping the whole workaround is no longer needed as of Kodi v16.1.

Still required in 16.1 unfortunately

Although the very first item in the 'fixes' list is regarding Directories Cache

Quote:Fixes done in 16.1
• Never cache addons directories

I still see a cached list after upgrading to the new 16.1 release (had previously been using 16.1RC2)
Note - I have several different machines -
the one with your modified script displays the correct list;
one that I just updated to 16.1 (official release) still points to a down-rev list that is presumably cached (even after deleting the shortcut and re-establishing)
Hi, is there anyway at all I can edit a change via script-skinshortcuts-includes.xml? There is an animation I want to get rid of in the Unity skin when switching between menus. However I have tried changing allsorts via the other relevant xml's and they change nothing, taking the animation from script-skinshortcuts-includes.xml did temporarily solve it but then obviously the script reloads itself in its original form. I have looked at the docs on Github but it says see developer documentation for help, pardon me for my ignorance but I'm having trouble finding said the relevant area. Any help is massively appreciated.

Thanks,
Gemma x
(2016-04-30, 22:47)Gems1 Wrote: [ -> ]Hi, is there anyway at all I can edit a change via script-skinshortcuts-includes.xml? There is an animation I want to get rid of in the Unity skin when switching between menus. However I have tried changing allsorts via the other relevant xml's and they change nothing, taking the animation from script-skinshortcuts-includes.xml did temporarily solve it but then obviously the script reloads itself in its original form. I have looked at the docs on Github but it says see developer documentation for help, pardon me for my ignorance but I'm having trouble finding said the relevant area. Any help is massively appreciated.

The FAQ is accurate. Any change will be overwritten.

If the animation is in the includes file it most likely it comes from a template, so these would be the relevant developers docs.
Thank you kindly Bob, I now have it sorted, useful piece of knowledge gained too, so thankful for that!

Have a good evening! Smile
hi all

i,m new to to this, but have experience in html etc, so am learning on the fly. Couple of quick questions, may be basic but as said total novice,,lol

This is a snippit from my "mainmenu.DATA.xml"

<shortcuts>
<shortcut>
<defaultID />
<label>Movies</label>
<label2>Custom item</label2>
<icon>DefaultShortcut.png</icon>
<thumb />
<action>ActivateWindow(VideoLibrary,"plugin://plugin.video.exodus/?action=movies&amp;url=traktcollection",return)</action>
</shortcut>
<shortcut>
<defaultID />
<label>TV</label>
<label2>Custom item</label2>
<icon>DefaultShortcut.png</icon>
<thumb />
<action>noop</action>
</shortcut>
<shortcut>
<defaultID />
<label>Live Sports</label>
<label2>Custom item</label2>
<icon>DefaultShortcut.png</icon>
<thumb />
<action>ActivateWindow(VideoLibrary,"plugin://plugin.video.sportsmania",return)</action>
</shortcut>
<shortcut>
<defaultID />
<label>BT Sports</label>
<label2>Custom item</label2>
<icon>DefaultShortcut.png</icon>
<thumb />
<action>

How do i put a background for each when I move across menu?

Many thnaks in advance
@Beaty59 - via the skins menu editor, assuming the skin has implemented backgrounds.

(In general, though, backgrounds and other such properties which aren't shared between skins are stored in the skin.id.properties file - however this file is not designed to be manually edited, and there is no support given if you decide to do so.)

Also, please read Skin Shortcuts FAQ: Banned add-on policy and banned add-ons (wiki).