• 1
  • 18
  • 19
  • 20(current)
  • 21
  • 22
  • 140
Release script.skinshortcuts
After reading my EDIT i see now that is the same thing with my last question (same menus across skins). Sorry... my English sucks !!!

Let me try again. If i am changing skins and i don't want to use the same structure and items i can have the current skin's menus by resetting the shortcuts.
So... can this be avoided and/or can i do it by one reset click for all menus (main menu and submenus) because for the submenus you need to reset one by one if you want to reset all of them.

So to make sure i express this correctly:
A. Change skins and keep the same main menu, submenus, widgets etc even if the user resets shortcuts
B. Change skins and reset from one click/button/option the main menu, submenus, widgets etc to current skin's defaults.

Cheers
Nessus
Reply
I appear to have removed the obvious references to it when cleaning up the documentation (there's such a thing as too clean!) - I'll restore them at the weekend.

You can give the user the choice to reset all the menus to the skins defaults by including a button with:

<onclick>RunScript(script.skinshortcuts?type=resetall)</onclick>

(Just to be clear, not that it should affect anything, this deletes (if the user agrees to it) everything in the scripts addon data directory, even if the DATA.xml/.shortcuts file isn't part of the current menu)
Reply
Great. Thanks a lot.

About this..
(2014-08-19, 01:31)Unfledged Wrote: DefaultID and labelID will both be ignored if used in a skins default ahortcuts. Both are generated by the script when shortcuts are built (defaultID the first time shortcuts are built, labelID every time shortcuts are built.) They are both unlocalised forms of the shortcuts label, one permanent through the life of the shortcut, the other temporary for the current state of the shortcut. Neither are elements you need to provide in your defaults, nor should be editing Smile

See the file "labelID and defaultID.txt" in the skins resources directory for details of what the value of these will be. They are designed to be very predictable!

For me, if the shortcut is like this in mainmenu.DATA.xml
PHP Code:
<shortcut>
    <
label>$LOCALIZE[31002]</label>
    <
label2>32034</label2>
    <
defaultID>tvshows</defaultID>
    <
icon>buttons/arrow.png</icon>
    <
thumb />
    <
action>ActivateWindow(Videos,TVShowTitles,return)</action>
</
shortcut

then i have this in script-skinshortcuts-includes.xml
PHP Code:
<item id="1">
    <
label>$LOCALIZE[31002]</label>
    <
label2>$ADDON[script.skinshortcuts 32034]</label2>
    <
icon>buttons/arrow.png</icon>
    <
thumb />
    <
property name="labelID">31002</property>
    <
property name="defaultID">31002</property>
    <
visible>Library.HasContent(TVShows)</visible>
    <
onclick>ActivateWindow(Videos,TVShowTitles,return)</onclick>
    <
visible>StringCompare(System.ProfileName,Nessus)</visible>
    <
property name="submenuVisibility">$NUMBER[31002]</property>
    <
property name="group">mainmenu</property>
</
item

if i add the <labelID>tvshows</labelID> tag in the <shortcut> then the submenuVisibility is fixed
PHP Code:
<property name="submenuVisibility">tvshows</property


Gotham v13.2
script.skinshortcuts v0.4.0

Cheers
Nessus
Reply
From a quick look that looks correct - the automatically generated labelID should be 31002, and the submenuVisibility is that, only specified as a number.

Is it actually causing a problem, such as the submenu not showing?
Reply
Yes. The submenu is not visible when the property is like this:
PHP Code:
<property name="submenuVisibility">$NUMBER[31002]</property
Reply
OK, please send me all your .DATA.xml files and your script-skinshortcuts-includes.xml file. I'll try to take a look this evening though, if its a complex issue, I'll finish looking tomorrow Smile

Edit: Thanks for the files. I've tested your script-skinshortcuts-includes.xml (with a search-and-replace on the profile name for the first user - nessus) and all the items are showing for me with their relevant submenu, so I'm going to need some more time with this. I'll let you know when I've got something Smile

Edit 2: I've been unable to recreate this problem, but I'll push an update to how the submenuVisibility is generated this weekend (or sooner, if I get time) which should clear up whatever's the underlying issue.
Reply
I keep getting the error stating: Skin Shortcuts - Unable to build menu

I already reinstalled xbmc 13.2 final but that does not change anything. What must I do to fix this issue?

Code:
20:16:32 T:4840   ERROR: C:\Users\Bj�rn\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\datafunctions.py:407: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
                                              if not xbmcgui.Window( 10000 ).getProperty( "skinshortcuts-overrides-user-data" + profileDir ) or not xbmcgui.Window( 10000 ).getProperty( "skinshortcuts-overrides-user" + profileDir ) == __profilepath__:
20:16:32 T:4840   ERROR: C:\Users\Bj�rn\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\datafunctions.py:383: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
                                              if not xbmcgui.Window( 10000 ).getProperty( "skinshortcuts-overrides-skin-data" ) or not xbmcgui.Window( 10000 ).getProperty( "skinshortcuts-overrides-skin" ) == __skinpath__:
20:16:32 T:4840   ERROR: Traceback (most recent call last):
20:16:32 T:4840   ERROR:   File "C:\Users\Bj�rn\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 83, in buildMenu
20:16:32 T:4840   ERROR:     self.writexml( profilelist, mainmenuID, groups, numLevels, buildMode, progress, options )
20:16:32 T:4840   ERROR:   File "C:\Users\Bj�rn\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 395, in writexml
20:16:32 T:4840   ERROR:     self.buildElement( submenuItem, submenuTree, submenu, "StringCompare(Container(" + mainmenuID + ").ListItem.Property(submenuVisibility)," + escapeXML( DATA.slugify( submenu ) ) + ")", profile[1], itemid = itemidsubmenu, options = options )
20:16:32 T:4840   ERROR:   File "C:\Users\Bj�rn\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 505, in buildElement
20:16:32 T:4840   ERROR:     elif onclick.text.startswith( "ActivateWindow(" ) and xbmc.translatePath( "special://skin/" ) in onclick.text:
20:16:32 T:4840   ERROR: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 11: ordinal not in range(128)
20:16:32 T:4840  NOTICE: Log level changed to 2
20:16:32 T:4840  NOTICE: Enabled debug logging due to GUI setting. Level 2.
20:16:32 T:4840   DEBUG: script.skinshortcuts: Profile found: Master user (special://masterprofile/)
20:16:32 T:4840   DEBUG: script.skinshortcuts: Includes file does not exist
20:16:32 T:6848   DEBUG: ------ Window Init () ------
20:16:32 T:4840   DEBUG: script.skinshortcuts: Loading shortcuts for group x1
20:16:32 T:4840   DEBUG: script.skinshortcuts:  - No shortcuts
20:16:32 T:4840   DEBUG: script.skinshortcuts: Loading shortcuts for group x2
20:16:32 T:4840   DEBUG: script.skinshortcuts:  - Loaded file C:\Users\Björn\AppData\Roaming\XBMC\addons\skin.aeon.nox.5\shortcuts\x2.DATA.xml
20:16:32 T:4840   DEBUG: script.skinshortcuts: Failed to write menu
20:16:32 T:4840   ERROR: Traceback (most recent call last):
20:16:32 T:4840   ERROR:   File "C:\Users\Bj�rn\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 83, in buildMenu
20:16:32 T:4840   ERROR:     self.writexml( profilelist, mainmenuID, groups, numLevels, buildMode, progress, options )
20:16:32 T:4840   ERROR:   File "C:\Users\Bj�rn\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 395, in writexml
20:16:32 T:4840   ERROR:     self.buildElement( submenuItem, submenuTree, submenu, "StringCompare(Container(" + mainmenuID + ").ListItem.Property(submenuVisibility)," + escapeXML( DATA.slugify( submenu ) ) + ")", profile[1], itemid = itemidsubmenu, options = options )
20:16:32 T:4840   ERROR:   File "C:\Users\Bj�rn\AppData\Roaming\XBMC\addons\script.skinshortcuts\resources\lib\xmlfunctions.py", line 505, in buildElement
20:16:32 T:4840   ERROR:     elif onclick.text.startswith( "ActivateWindow(" ) and xbmc.translatePath( "special://skin/" ) in onclick.text:
20:16:32 T:4840   ERROR: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 11: ordinal not in range(128)
Reply
(2014-08-20, 20:21)TechnoTuup Wrote: I keep getting the error stating: Skin Shortcuts - Unable to build menu

I already reinstalled xbmc 13.2 final but that does not change anything. What must I do to fix this issue?

It looks like you've found a bug, so there's not much you can do directly - but you can help track it down by posting a full debug log (wiki) somewhere like xbmclogs.com and pasting a link to it here (please don't paste the full log here Smile)

It's even easier than said in the link above if you have the XBMC Log Uploader script installed - when the menu fails to build the script will take care of enabling debug logging and calling the log uploader script - just note down the URL it gives you and paste it here.

You've caught me on a busy week, so once the log is uploaded I'll look into this over the weekend.
Reply
Can you tell me where I can find that url? XBMC Log Uploader only states that the log is uploaded to xbmclogs.com. In the log file in APPDATA I do not see any url as well.
Reply
The log uploader will display onscreen the URL it has uploaded to, or you can put an email address in the log uploaders settings and it will email you the link. Or manually upload via the instructions on the debug log (wiki) wiki page. Smile
Reply
(2014-08-19, 02:26)Unfledged Wrote: Edit 2: I've been unable to recreate this problem, but I'll push an update to how the submenuVisibility is generated this weekend (or sooner, if I get time) which should clear up whatever's the underlying issue.
When i start XBMC with no addon-data at all, the script-skinshortcuts-includes.xml it creates the LabelID's and the submenuVisibility property correctly with non-localized strings. As soon i am changing something with the script's manage dialog, then the script-skinshortcuts-includes.xml changes the LabelID to a localized string and the submenuVisibility property to a $NUMBER. I put a "resetall" button to the script-skinshortcuts.xml and if reset all the shortcuts then the script-skinshortcuts-includes.xml it builds all the elements properly.

So... the DATA.xml files have the correct structure and info and something goes wrong when the menus are re-builded ?


Cheers
Nessus
Reply
It looks like it, which is why I'll change the submenu visibility property to not use the labelID this weekend (or sooner if time allows) - hopefully it'll all work as intended afterwards *crosses fingers*
Reply
Thanks
Reply
@nessus, could you try the latest git version, and let me know if it works? Cheers.
Reply
Sorry but no. The only deference is that the "$NUMBER" thing is now "num-". The labelID is still localized.

Here is the Music item from script-skinshortcuts-includes.xml..
PHP Code:
<item id="3">
    <
label>$LOCALIZE[2]</label>
    <
label2>Common Shortcut</label2>
    <
icon>DefaultMusicAlbums.png</icon>
    <
thumb />
    <
property name="labelID">2</property>
    <
property name="defaultID">2</property>
    <
onclick>ActivateWindow(Music)</onclick>
    <
visible>StringCompare(System.ProfileName,Nessus)</visible>
    <
property name="submenuVisibility">num-2</property>
    <
property name="group">mainmenu</property>
    <
property name="hasSubmenu">True</property>
</
item

EDIT: Another one. If you reset submenu's shortcuts from a mainmenu item (eg Music) all the shortcuts in that submenu are deleted. If you use the <resetall> button, then the default shortcuts for that submenu are back again.


Cheers
Nessus
Reply
  • 1
  • 18
  • 19
  • 20(current)
  • 21
  • 22
  • 140

Logout Mark Read Team Forum Stats Members Help
script.skinshortcuts8