• 1
  • 101
  • 102
  • 103(current)
  • 104
  • 105
  • 140
Release script.skinshortcuts
(2016-08-25, 16:49)BobCratchett Wrote: I believe the only way would be to check (within the management dialog) the ListItem.Property(path) / ListItem.Property(displayPath) to see if it goes to, for example, the video library.

(2016-08-25, 12:59)chrisism Wrote: Following up with my skinshortcuts questions....

The only way is to include the definition for widgetstyle.1, widgetstyle.2 and so-on in your overrides.

Thanks for the info.
When I look at the Titan mediabrowser skin source I do see him doing it with only one widgetstyle property in the overrides and using skinhelper script added buttons for widgetstyle.1 etc.
But indeed I couldnt get the exact same solution working for me.

Have to do it dirty and add all the options for widgetstyle.1, .2 etc. Thanks for the explanation
Reply
Sorry, I got another one.How more I am using it how more questions I have.

So I added a special grouping in the available shortcuts in the overrides.xml and added some shortcuts to certain calls for an addon. Now I have also added a shortcut with ||Browse||plugin.program.. etc. Opening it up when adding the shortcut it works perfectly and I can browse through the items and add the shortcut.

But it saves it as the action <onclick>RunAddon(plugin://plugin.program.. and I will get an error when trying to open the menu item: RunAddon: unknown add-on id

I was thinking about using an action override for this, but the problem is that the original action has some random ids as parameters depending on how the user has set up his categories in the addon. So unless there is a way of doing some string manipulations with ::ACTION:: this wont work.

So anyone another idea or solution?
Reply
Specify a type element in the overrides - for example, if it's a video plugin:-

Code:
<shortcut label="..." type="32010">||BROWSE||plugin.identifier</shortcut>

Where 32010 is specified as 'Video Add-On' in the Skin Shortcuts language files. Note that specifying plugins as available shortcuts in this way is undocumented and so its possible the behaviour may change in future without warning.
Reply
(2016-08-27, 14:38)BobCratchett Wrote: Specify a type element in the overrides - for example, if it's a video plugin:-

Code:
<shortcut label="..." type="32010">||BROWSE||plugin.identifier</shortcut>

Where 32010 is specified as 'Video Add-On' in the Skin Shortcuts language files. Note that specifying plugins as available shortcuts in this way is undocumented and so its possible the behaviour may change in future without warning.

Actually, that is what I did.
Code:
<node label="Games" icon="DefaultShortcut.png" condition="System.HasAddon(plugin.program.advanced.emulator.launcher)">
    <shortcut label="Categories"     type="32021" icon="special://skin/extras/icons/Ael.png">||BROWSE||plugin.program.advanced.emulator.launcher/?com=SHOW_ALL_CATEGORIES</shortcut>

But the result will be "RunAddon(plugin://plugin.program.advanced... " which will give errors.
Reply
That would be because 32021 isn't a type that returns an ActivateWindow-based action Wink

If you want the action to activate the plugin in the Videos window then the valid types are currently 32010, 32014 & 32069; Music are 32011, 32019 & 32073; Pictures are 32012 & 32089 and Programs is 32009.
Reply
(2016-08-27, 18:51)BobCratchett Wrote: That would be because 32021 isn't a type that returns an ActivateWindow-based action Wink

If you want the action to activate the plugin in the Videos window then the valid types are currently 32010, 32014 & 32069; Music are 32011, 32019 & 32073; Pictures are 32012 & 32089 and Programs is 32009.

Yep, that did the trick. Thanks!
I copied a different labelid instead of the type and before that I had a custom type. So this explains why I got it the whole time.
Better check my whole shortcuts lists if I havent made the same mistake with other nodes.
Reply
Found a small issue:
The visibleoverride ignores the condition of the set globaloverride and breaks it.

Example override
Code:
    <visibleoverride condition="PVR.HasTVChannels">RunScript(script.skin.helper.service,action=dialogok,header=$LOCALIZE[257],message=$LOCALIZE[31327])</visibleoverride>
    <visibleoverride condition="Library.HasContent(Movies)">ActivateWindow(Videos,Files,return)</visibleoverride>
    <visibleoverride condition="Library.HasContent(TVShows)">ActivateWindow(Videos,Files,return)</visibleoverride>
    <override action="globaloverride" group="mainmenu">
        <condition>!Control.IsVisible(91)</condition>
    </override>
    <override action="globaloverride" group="mainmenu">
        <condition>Control.IsVisible(91)</condition>
        <action>noop</action>
    </override>

Example built menu item
Code:
        <item id="3">
            <property name="id">$NUMBER[3]</property>
            <label>$LOCALIZE[342]</label>
            <label2>Common Shortcut</label2>
            <icon>DefaultMovies.png</icon>
            <thumb />
            <property name="labelID">movies</property>
            <property name="defaultID">movies</property>
            <property name="widgetName">Widget Group 1</property>
            <property name="widget">widget1</property>
            <property name="ftvWidget">widget1</property>
            <onclick condition="Library.HasContent(Movies)">ActivateWindow(Videos,MovieTitles,return)</onclick>
            <property name="path">ActivateWindow(Videos,MovieTitles,return)</property>
            <property name="list">MovieTitles</property>
            <onclick condition="![Library.HasContent(Movies)]">ActivateWindow(Videos,Files,return)</onclick>
            <onclick condition="!Control.IsVisible(91)">ActivateWindow(Videos,MovieTitles,return)</onclick>
            <onclick condition="Control.IsVisible(91)">noop</onclick>
            <visible>StringCompare(System.ProfileName,Master user)</visible>
            <property name="submenuVisibility">movies</property>
            <property name="group">mainmenu</property>
            <property name="hasSubmenu">True</property>
        </item>
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
Is it possible to skinning folders with this script? Smile
Reply
(2016-09-03, 20:36)sualfred Wrote: Found a small issue:
The visibleoverride ignores the condition of the set globaloverride and breaks it.

Whilst it's obviously not the behaviour you're wanting, that looks to be the expected behaviour - you have two overrides which are applicable to that menu item, and as such both get applied to it. So...

Code:
<visibleoverride condition="Library.HasContent(Movies)">ActivateWindow(Videos,Files,return)</visibleoverride>

... gives the expected ...

Code:
<onclick condition="Library.HasContent(Movies)">ActivateWindow(Videos,MovieTitles,return)</onclick>
<onclick condition="![Library.HasContent(Movies)]">ActivateWindow(Videos,Files,return)</onclick>

... and ...

Code:
<override action="globaloverride" group="mainmenu">
    <condition>Control.IsVisible(91)</condition>
    <action>noop</action>
</override>

... it's expected ...

Code:
<onclick condition="!Control.IsVisible(91)">ActivateWindow(Videos,MovieTitles,return)</onclick>
<onclick condition="Control.IsVisible(91)">noop</onclick>

Ultimately different overrides aren't aware of each other. They're all applied separately and don't take account of changes that other overrides may make.

(2016-09-04, 00:22)emre.ay Wrote: Is it possible to skinning folders with this script? Smile

As I don't know what that means, I'm going to guess 'No'.
Reply
(2016-09-04, 01:12)BobCratchett Wrote: Whilst it's obviously not the behaviour you're wanting, that looks to be the expected behaviour - you have two overrides which are applicable to that menu item, and as such both get applied to it.

Yes, but that means the globaloverride is compeletly useless if one single visibleoverride setting is present.

Isn't it possible that globaloverride respects the other setting to get something like this?
Code:
<onclick condition="![Control.IsVisible(91)] + Library.HasContent(Movies)">ActivateWindow(Videos,MovieTitles,return)</onclick>
<onclick condition="![Control.IsVisible(91)] + ![Library.HasContent(Movies)]">ActivateWindow(Videos,Files,return)</onclick>
<onclick condition="Control.IsVisible(91)">noop</onclick>

Edit:
Or maybe changing the visibleoverride result to get two <item> entries instead of using conditional <onlick> commands.
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
(2016-09-04, 07:03)sualfred Wrote:
(2016-09-04, 01:12)BobCratchett Wrote: Whilst it's obviously not the behaviour you're wanting, that looks to be the expected behaviour - you have two overrides which are applicable to that menu item, and as such both get applied to it.

Yes, but that means the globaloverride is compeletly useless if one single visibleoverride setting is present.

Isn't it possible that globaloverride respects the other setting to get something like this?
Code:
<onclick condition="![Control.IsVisible(91)] + Library.HasContent(Movies)">ActivateWindow(Videos,MovieTitles,return)</onclick>
<onclick condition="![Control.IsVisible(91)] + ![Library.HasContent(Movies)]">ActivateWindow(Videos,Files,return)</onclick>
<onclick condition="Control.IsVisible(91)">noop</onclick>

Edit:
Or maybe changing the visibleoverride result to get two <item> entries instead of using conditional <onlick> commands.

Just for the record, and based on your example above, you believe the global override should have priority over the visible override...?

The big issue with this for me at the moment is sheer time - I'll look into it when I have some and have opened an issue on git so that I hopefully won't forget, but it won't be soon. If it's something you need quickly, then patches are welcome Wink
Reply
(2016-09-05, 09:17)BobCratchett Wrote: Just for the record, and based on your example above, you believe the global override should have priority over the visible override...?

The big issue with this for me at the moment is sheer time - I'll look into it when I have some and have opened an issue on git so that I hopefully won't forget, but it won't be soon. If it's something you need quickly, then patches are welcome Wink

Yes, global should have priority.
I would love to help, but my Python skills are limited to Hello World and filling some window properties Wink But I'm happy to provide feedback. Just ping me or send me a PM when you found some time for it .
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
I am playing with the templates now for my widgets and I have to types of includes I want to use. One for widgettype 'static' and one for all normal/default widgets.
To have to it all as clean as possible I am using the condition element in the includes. But is it possible to have a NOT condition?

So:
1 include where widgetType = 'static'
1 include where widgetType != 'static'

For now I have just added all other default widget types in the other include with a match any, but it would be simpler if I have a not is condition.
Or does somebody have the whole list of possible widgetTypes?
Reply
The widgetType property will either return any widgetType that you have specified in an additional widget, or the content type (or best guess thereof) of the widget - see the Content.Type(property) boolean condition on List of boolean conditions (wiki) for all the possibilities.

Assuming you're referring to condition elements in the template, there's no 'Not' condition. The closest is to have a template which has the condition, and then a second with no condition but the same include, which will then get built if the first one (or any previous one - they are processed sequentially) didn't match - as my time is both limited and split with other projects at present, if it's something you'd like it would be appreciated if you could open an issue on git so it doesn't get forgotten - I'll look into whether it's possible when time allows.
Reply
(2016-09-08, 20:03)BobCratchett Wrote: The widgetType property will either return any widgetType that you have specified in an additional widget, or the content type (or best guess thereof) of the widget - see the Content.Type(property) boolean condition on List of boolean conditions (wiki) for all the possibilities.

Assuming you're referring to condition elements in the template, there's no 'Not' condition. The closest is to have a template which has the condition, and then a second with no condition but the same include, which will then get built if the first one (or any previous one - they are processed sequentially) didn't match - as my time is both limited and split with other projects at present, if it's something you'd like it would be appreciated if you could open an issue on git so it doesn't get forgotten - I'll look into whether it's possible when time allows.

Did you mean "Container.Content(parameter)" instead of "Content.Type"? I cant find Content.Type(property) on that page.
The double includes thing seems like something. But with same include, do you mean two includes with the same name?

The NOT condition things is maybe something for the wishlist. There are ways arround it, but it would just make it a little bit simpler. Thanks
Reply
  • 1
  • 101
  • 102
  • 103(current)
  • 104
  • 105
  • 140

Logout Mark Read Team Forum Stats Members Help
script.skinshortcuts8