Release script.skinshortcuts - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12) +---- Forum: Skin helper addons (https://forum.kodi.tv/forumdisplay.php?fid=300) +---- Thread: Release script.skinshortcuts (/showthread.php?tid=178294) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
RE: script.skinshortcuts - chrisism - 2016-08-25 (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. 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 RE: script.skinshortcuts - chrisism - 2016-08-27 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? RE: script.skinshortcuts - BobCratchett - 2016-08-27 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. RE: script.skinshortcuts - chrisism - 2016-08-27 (2016-08-27, 14:38)BobCratchett Wrote: Specify a type element in the overrides - for example, if it's a video plugin:- Actually, that is what I did. Code: <node label="Games" icon="DefaultShortcut.png" condition="System.HasAddon(plugin.program.advanced.emulator.launcher)"> But the result will be "RunAddon(plugin://plugin.program.advanced... " which will give errors. RE: script.skinshortcuts - BobCratchett - 2016-08-27 That would be because 32021 isn't a type that returns an ActivateWindow-based action 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. RE: script.skinshortcuts - chrisism - 2016-08-28 (2016-08-27, 18:51)BobCratchett Wrote: That would be because 32021 isn't a type that returns an ActivateWindow-based action 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. RE: script.skinshortcuts - sualfred - 2016-09-03 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> Example built menu item Code: <item id="3"> RE: script.skinshortcuts - emre.ay - 2016-09-04 Is it possible to skinning folders with this script? RE: script.skinshortcuts - BobCratchett - 2016-09-04 (2016-09-03, 20:36)sualfred Wrote: Found a small issue: 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> ... and ... Code: <override action="globaloverride" group="mainmenu"> ... it's expected ... Code: <onclick condition="!Control.IsVisible(91)">ActivateWindow(Videos,MovieTitles,return)</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? As I don't know what that means, I'm going to guess 'No'. RE: script.skinshortcuts - sualfred - 2016-09-04 (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> Edit: Or maybe changing the visibleoverride result to get two <item> entries instead of using conditional <onlick> commands. RE: script.skinshortcuts - BobCratchett - 2016-09-05 (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. 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 RE: script.skinshortcuts - sualfred - 2016-09-05 (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...? Yes, global should have priority. I would love to help, but my Python skills are limited to Hello World and filling some window properties But I'm happy to provide feedback. Just ping me or send me a PM when you found some time for it . RE: script.skinshortcuts - chrisism - 2016-09-08 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? RE: script.skinshortcuts - BobCratchett - 2016-09-08 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. RE: script.skinshortcuts - chrisism - 2016-09-08 (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. 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 |