2020-09-04, 14:00
I want to set a string when skin shortcuts finish building menu. I put set string in xmlfunctions.py but it's not showing the string in skin settings.xml file.
Can anyone assist
Can anyone assist
xml:<onload condition="System.HasAddon(script.skinshortcuts)">RunScript(script.skinshortcuts,type=buildxml&mainmenuID=9000&group=mainmenu&levels=1&options=noGroups)</onload>
xml:<property name="id" tag="mainmenuid" />
<property name="label" tag="property" attribute="name|widget" value="embuaryhelpermoviesrandomgenre">$INFO[Container(1600$SKINSHORTCUTS[id]).ListItemAbsolute(0).Property(searchstring),More , movies]</property>
<property name="label" tag="property" attribute="name|widget" value="embuaryhelpertvshowsrandomgenre">$INFO[Container(1600$SKINSHORTCUTS[id]).ListItemAbsolute(0).Property(searchstring),More , shows]</property>
<property name="label" tag="property" attribute="name|widgetName" />
(2021-03-27, 10:23)Chillbo Wrote: @mikeSiLVO, do you know whether it's normal behaviour that the skinshortcuts script doesn't re-build the home menu anymore under v19 Matrix when the skin's template.xml file has been changed like it did under v18 Leia? Atm, I have to open the customization dialog, change an item and only then will it re-build.
I'm using this re-build code line:
xml:<onload condition="System.HasAddon(script.skinshortcuts)">RunScript(script.skinshortcuts,type=buildxml&mainmenuID=9000&group=mainmenu&levels=1&options=noGroups)</onload>
(2021-03-31, 14:15)SerpentDrago69 Wrote:(2021-03-27, 10:23)Chillbo Wrote: @mikeSiLVO, do you know whether it's normal behaviour that the skinshortcuts script doesn't re-build the home menu anymore under v19 Matrix when the skin's template.xml file has been changed like it did under v18 Leia? Atm, I have to open the customization dialog, change an item and only then will it re-build.
I'm using this re-build code line:
xml:<onload condition="System.HasAddon(script.skinshortcuts)">RunScript(script.skinshortcuts,type=buildxml&mainmenuID=9000&group=mainmenu&levels=1&options=noGroups)</onload>
Yes this is super annoying behavior , and is causing lots of users to wonder what happened to their menus after a simple update
(2021-03-31, 14:39)Chillbo Wrote:My issue was i was including the the skinshorcuts includes.xml the generated file , i shouldn't have been , i know this .. was just being stupid .(2021-03-31, 14:15)SerpentDrago69 Wrote:(2021-03-27, 10:23)Chillbo Wrote: @mikeSiLVO, do you know whether it's normal behaviour that the skinshortcuts script doesn't re-build the home menu anymore under v19 Matrix when the skin's template.xml file has been changed like it did under v18 Leia? Atm, I have to open the customization dialog, change an item and only then will it re-build.
I'm using this re-build code line:
xml:<onload condition="System.HasAddon(script.skinshortcuts)">RunScript(script.skinshortcuts,type=buildxml&mainmenuID=9000&group=mainmenu&levels=1&options=noGroups)</onload>
Yes this is super annoying behavior , and is causing lots of users to wonder what happened to their menus after a simple update
Can this be fixed maybe? I'm not sure how users of my skin will get changes otherwise?
xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="context.skinshortcuts.addtomenu" name="Skin Shortcuts - Add To Menu" version="1.0.0" provider-name="BobCratchett">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.skinshortcuts" version="1.1.4"/>
</requires>
<extension point="kodi.context.item" library="addon.py">
<item>
<label>32000</label>
<visible>!StringCompare(ListItem.Label,..) + ListItem.IsFolder</visible>
</item>
</extension>
<extension point="kodi.addon.metadata">
<platform>all</platform>
<summary lang="en_GB">Add folders to Skin Shortcuts managed menus</summary>
<description lang="en_GB">Add folders to Skin Shortcuts managed menus directly from the context menu. Requires skin support.</description>
<license>GNU General Public License, v2</license>
<forum></forum>
<source>https://github.com/Ignoble61/context.skinshortcuts.addtomenu</source>
</extension>
</addon>
xml:
import sys
import xbmc, xbmcgui
import urllib
if __name__ == '__main__':
# Extract the info we'll send over to Skin Shortcuts
filename = sys.listitem.getfilename()
label = sys.listitem.getLabel()
icon = xbmc.getInfoLabel( "ListItem.Icon" )
content = xbmc.getInfoLabel( "Container.Content" )
window = xbmcgui.getCurrentWindowId()
# Call Skin Shortcuts
runScript = "RunScript(script.skinshortcuts,type=context&filename=%s&label=%s&icon=%s&content=%s&window=%s)" %( urllib.quote( filename ), label, icon, content, window )
xbmc.executebuiltin( "%s" %( runScript ) )
(2021-04-06, 13:44)the_other_guy Wrote: is there a context.skinshortcuts.addtomenu for kodi 19Try that.
i get this error from version="1.0.0"
xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="context.skinshortcuts.addtomenu" name="Skin Shortcuts - Add To Menu" version="1.0.0" provider-name="BobCratchett">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.skinshortcuts" version="1.1.4"/>
</requires>
<extension point="kodi.context.item" library="addon.py">
<item>
<label>32000</label>
<visible>!StringCompare(ListItem.Label,..) + ListItem.IsFolder</visible>
</item>
</extension>
<extension point="kodi.addon.metadata">
<platform>all</platform>
<summary lang="en_GB">Add folders to Skin Shortcuts managed menus</summary>
<description lang="en_GB">Add folders to Skin Shortcuts managed menus directly from the context menu. Requires skin support.</description>
<license>GNU General Public License, v2</license>
<forum></forum>
<source>https://github.com/Ignoble61/context.skinshortcuts.addtomenu</source>
</extension>
</addon>
xml:
import sys
import xbmc, xbmcgui
import urllib
if __name__ == '__main__':
# Extract the info we'll send over to Skin Shortcuts
filename = sys.listitem.getfilename()
label = sys.listitem.getLabel()
icon = xbmc.getInfoLabel( "ListItem.Icon" )
content = xbmc.getInfoLabel( "Container.Content" )
window = xbmcgui.getCurrentWindowId()
# Call Skin Shortcuts
runScript = "RunScript(script.skinshortcuts,type=context&filename=%s&label=%s&icon=%s&content=%s&window=%s)" %( urllib.quote( filename ), label, icon, content, window )
xbmc.executebuiltin( "%s" %( runScript ) )
Error Type: <class 'AttributeError'>
Error Contents: 'xbmcgui.ListItem' object has no attribute 'getfilename'
Traceback (most recent call last):
File "C:\Users\pearc\AppData\Roaming\Kodi\addons\context.skinshortcuts.addtomenu\addon.py", line 7, in <module>
filename = sys.listitem.getfilename()
AttributeError: 'xbmcgui.ListItem' object has no attribute 'getfilename'
-->End of Python script error report<--
filename = sys.listitem.getfilename()
filename = sys.listitem.getPath()
(2021-03-31, 15:12)SerpentDrago69 Wrote:(2021-03-31, 14:39)Chillbo Wrote:My issue was i was including the the skinshorcuts includes.xml the generated file , i shouldn't have been , i know this .. was just being stupid .(2021-03-31, 14:15)SerpentDrago69 Wrote: Yes this is super annoying behavior , and is causing lots of users to wonder what happened to their menus after a simple update
Can this be fixed maybe? I'm not sure how users of my skin will get changes otherwise?
carry on !