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 - avia - 2015-12-02 Thank you RE: script.skinshortcuts - BobCratchett - 2015-12-02 (2015-12-02, 13:15)Mr. V Wrote: Cheers Bob. It is working now. Great news. I was worried that one was going to prove a nasty one to track down - always glad to be wrong about that sort of thing! Fixes are now on git. (2015-12-02, 18:42)Jayz2K Wrote: Hi, Bob Groupname is primarily for use when building additional menus unlinked to the main menu. What you want to do isn't possible at the moment - the code only allows a single fallback value in case the user hasn't set one. I'm trying to only do bug fixes at the moment, so I'll add conditional fallback values to my list to look at after a repo push (and may well come back to you so we can work out exactly what you need adding ) (2015-12-02, 18:56)avia Wrote: Hi In addition to what Hitcher said (and thanks Hitcher ), be aware that changes you make there will be overwritten when the script updates on the repo. You may consider doing a PR with your language changes, though even then it's worth noting that if the script is added to Transifex (the service Kodi uses to manage translations), any translations would then need to be done there as all the language files on git would get overwritten before repo pushes (not that I'm aware of any intention from anyone to ask for the script to be added to Transifex at the moment). RE: script.skinshortcuts - Jeroen - 2015-12-02 Is it somehow possible to point the widgetPath to a custom made static list? As an include so to speak? I would want to use it for a weather widget for example. Sure I could add a separate container specifically for that but if I can prevent that I will RE: script.skinshortcuts - BobCratchett - 2015-12-02 If using templates, you can set the property to an include. Harder to do without templates, as trying to use an include in the property causes issues with the xml... (Am about to leave to grab a train, so if you need more info - and no-one beats me to it - it won't be till Friday ) RE: script.skinshortcuts - Mr. V - 2015-12-02 (2015-12-02, 19:15)BobCratchett Wrote:(2015-12-02, 18:42)Jayz2K Wrote: Hi, Bob This is a similar issue I was having. A conditional property fallback would be of great help. I wanted to set a condition for a widget menu property so a particular type of widget artwork can be set. For example, something like this would definitely allow for more flexibility. <propertyfallback tag="widgetArt" attribute="name|widgetType" condition="songs">Square Poster</propertyfallback> <propertyfallback tag="widgetArt" attribute="name|widgetType" condition="albums">Square Poster</propertyfallback> <propertyfallback tag="widgetArt" attribute="name|widgetType" condition="movies">Poster</propertyfallback> <propertyfallback tag="widgetArt" attribute="name|widgetType" condition="episodes">Poster</propertyfallback> Also if a certain menu property does not exist or is empty such as widget path it will not set the fallback. In my case for the template I use, it will not build if the widgetPath has not been set <propertyfallback tag="widgetStyle" attribute="name|widgetPath" empty="false">Panel</propertyfallback> the tag "empty"=[true/false]: if false it will not set the fallback if the attribute widgetPath is does not exist or is empty. Would be great if something like this could be done. RE: script.skinshortcuts - Jayz2K - 2015-12-02 (2015-12-02, 19:15)BobCratchett Wrote: Groupname is primarily for use when building additional menus unlinked to the main menu. What you want to do isn't possible at the moment - the code only allows a single fallback value in case the user hasn't set one. I'm trying to only do bug fixes at the moment, so I'll add conditional fallback values to my list to look at after a repo push (and may well come back to you so we can work out exactly what you need adding ) Well, that's what I thought. I didn't get it that bad :p No worries and no rush Bob, and thanks for taking this into consideration. Sorry for asking again for unconventional features and assuming it's mostly for a "first skin start", it can wait a lil more. However, because widgets are part of the script's core, conditional Default props sounds making sens ? Good luck in your bugs chase ! EDIT : (2015-12-02, 23:14)Mr. V Wrote: <propertyfallback tag="widgetArt" attribute="name|widgetType" condition="movies">Poster</propertyfallback> +1 ... I like the typo idea . Looks similar to what we use to use. EDIT 2 : One more question, what is providing content for those widgets : Code: <content>video</content> Because since a few, the playlist doesn't show episodes thumbs for 'In progress TV Shows' ... I get poster instead. Is this Library.Data or a SkinShortcuts built playlist from it ? RE: script.skinshortcuts - Jeroen - 2015-12-03 (2015-12-02, 22:20)BobCratchett Wrote: If using templates, you can set the property to an include. Harder to do without templates, as trying to use an include in the property causes issues with the xml... (Am about to leave to grab a train, so if you need more info - and no-one beats me to it - it won't be till Friday ) I think I am going to need a little help So, I have my widget container which has the content path and target: PHP Code: ... Which is used by all widgets. In my overrides.xml I have this in place: PHP Code: <widgetdefaultnode defaultID="weather" label="8" group="mainmenu" type="Weather" path="$INCLUDE[WeatherForecast]" target="?">WeatherForecast</widgetdefaultnode> What does the target need to be set on in this case? Does it even matter? Would my template need to look at least something like this? PHP Code: <template> Or would I need to bring over the entire container which is now in a "normal" include xml and use that for all widgets? I feel like I'm completely off here RE: script.skinshortcuts - Hitcher - 2015-12-03 Glad I'm not the only one struggling to get to grips with templates. RE: script.skinshortcuts - Jayz2K - 2015-12-03 (2015-12-03, 09:02)Jeroen Wrote: I think I am going to need a little help What I'm doing for this is passing all the needed SkinShortcuts entries to an include. This way I manage widgets inside skin files You can set your node as shortcut : PHP Code: <node label="31147"> Then made a Template passing the entries to Home like : PHP Code: <template> I call the Template in Home.xml : PHP Code: <include>skinshortcuts-template-MyWidgets</include> And finally placed the include layout calling the entries in my includes.xml : PHP Code: <include name="MyWidgetsInclude"> This way you can manage any kind of widgets with the same layout directly in "includes.xml". The downside of this is the "includes" refreshing problem, that's why I'm also passing a $PARAM[Id] to change the container Id (so they each have a different one and can be managed individually). I you want to make different containers for different widgets, you can also StringCompare $PARAMs. I'm not sure it's the easiest way but it works and I find it flexible to manage Inside the skin layout RE: script.skinshortcuts - BobCratchett - 2015-12-03 (2015-12-03, 09:02)Jeroen Wrote:(2015-12-02, 22:20)BobCratchett Wrote: If using templates, you can set the property to an include. Harder to do without templates, as trying to use an include in the property causes issues with the xml... (Am about to leave to grab a train, so if you need more info - and no-one beats me to it - it won't be till Friday ) This will have to be a really quick answer, my apologies. The template would have to look something like... PHP Code: <template> The <include name="WeatherForecast"> would still be wherever you keep includes (most likely includes.xml ) - the $SKINSHORTCUTS[path] will be replaced with <include>WeatherForecast</include>. For weather, yes target could be empty . (Unless you just want to use templates for weather - in which case simplify In the <condition /> check for the weather widget specifically, have the entire gui be the $SKINSHORTCUTS[path] (though it has to be in an element - <content>HERE</content> or attribute <content attrib="HERE" />, and no - the <controls /> doesn't count ) and have the entire static list, container and all, in the include.) Templates are still in their infancy, feel free to offer suggestions for improvements. I know there's other queries in the thread, I'll look at them when I get time (probably tomorrow.) RE: script.skinshortcuts - Jeroen - 2015-12-03 Many thanks Jayz2K and Bob, I will look into it ASAP, I am sure your examples will help out a lot! RE: script.skinshortcuts - Mr. V - 2015-12-03 This example of my widget implementation might be some help for you all using templates. I used templates to completely code the widgets along with $PARAM Includes. template.xml overrides.xml Includes_Widgets.xml You could probably copy and paste most of this into any skin with some texture and co-ordinate changes. RE: script.skinshortcuts - BobCratchett - 2015-12-03 @Jayz2K - That's a nice way to integrate the templates and the skin-side stuff. Fancy doing a brief write-up for the docs...? @Mr. V - I looked through your template the other day and was impressed Can I link to it when people want a good example in the future? (2015-12-02, 23:22)Jayz2K Wrote: EDIT 2 : One more question, what is providing content for those widgets : Actually they're the users + skins playlists, with the path to the playlist passed through as the widgetPath property. RE: script.skinshortcuts - Mr. V - 2015-12-03 (2015-12-03, 23:29)BobCratchett Wrote: @Mr. V - I looked through your template the other day and was impressed Can I link to it when people want a good example in the future? Fine by me. RE: script.skinshortcuts - Jayz2K - 2015-12-04 (2015-12-03, 23:29)BobCratchett Wrote: @Jayz2K - That's a nice way to integrate the templates and the skin-side stuff. Fancy doing a brief write-up for the docs...? Thanks Bob. Sure, what kind of doc you have in mind ? A concrete example or a more general explaination ? Or both ? (2015-12-03, 23:29)BobCratchett Wrote: Actually they're the users + skins playlists, with the path to the playlist passed through as the widgetPath property. So, it doesn't come from there. I really have to have a closer look to the content definitions. I actually have an xml file as widgetPath for InProgressTvShows but have no user or skin playlists. Maybe one of Skin.Helper's presets ... Not sure. I admit being less confortable on this part to gather different content providers. |